Improved logging.
This commit is contained in:
parent
fb17c49c8c
commit
c1e4171222
3 changed files with 28 additions and 28 deletions
|
@ -75,11 +75,11 @@ in case of fixing sha hash use:
|
|||
content = item.content
|
||||
sha = Digest::SHA256.hexdigest(content)
|
||||
logger.info "CHECK: Store::File.find(#{item.id})"
|
||||
|
||||
next if sha == item.sha
|
||||
|
||||
success = false
|
||||
logger.error "DIFF: sha diff of Store::File.find(#{item.id}) "
|
||||
logger.error "DIFF: sha diff of Store::File.find(#{item.id}) current:#{sha}/db:#{item.sha}/provider:#{item.provider}"
|
||||
store = Store.find(store_file_id: item.id)
|
||||
logger.error "STORE: #{store.inspect}"
|
||||
if fix_it
|
||||
item.update_attribute(:sha, sha)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue