Skip to content

Commit

Permalink
Merge pull request #148 from d-m-u/update_attrs_deprecation
Browse files Browse the repository at this point in the history
update_attributes deprecation
  • Loading branch information
agrare committed Sep 13, 2019
2 parents 4dd4633 + a1fe9ff commit 05c6f00
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ def full_refresh
memory.add_list_version(:vm_instances, collector.vm_instances.resource_version)
memory.add_list_version(:templates, collector.templates.resource_version)

manager.update_attributes(:last_refresh_error => nil, :last_refresh_date => Time.now.utc)
manager.update(:last_refresh_error => nil, :last_refresh_date => Time.now.utc)
rescue StandardError => error
_log.error('Full refresh failed.')
_log.log_backtrace(error)
manager.update_attributes(:last_refresh_error => error.to_s, :last_refresh_date => Time.now.utc)
manager.update(:last_refresh_error => error.to_s, :last_refresh_date => Time.now.utc)
end

#
Expand Down Expand Up @@ -175,11 +175,11 @@ def partial_refresh(notices)
memory.add_notice(notice)
end

manager.update_attributes(:last_refresh_error => nil, :last_refresh_date => Time.now.utc)
manager.update(:last_refresh_error => nil, :last_refresh_date => Time.now.utc)
rescue StandardError => error
_log.error('Partial refresh failed.')
_log.log_backtrace(error)
manager.update_attributes(:last_refresh_error => error.to_s, :last_refresh_date => Time.now.utc)
manager.update(:last_refresh_error => error.to_s, :last_refresh_date => Time.now.utc)
end

#
Expand Down

0 comments on commit 05c6f00

Please sign in to comment.