Make Geo::BaseSyncService#update_registry clearer

parent aff0e5e2
...@@ -54,15 +54,13 @@ module Geo ...@@ -54,15 +54,13 @@ module Geo
log("Updating #{type} sync information") log("Updating #{type} sync information")
attrs = {}.tap do |attrs| attrs = {}
if started_at
attrs["last_#{type}_synced_at"] = started_at attrs["last_#{type}_synced_at"] = started_at if started_at
end
if finished_at
if finished_at attrs["last_#{type}_successful_sync_at"] = finished_at
attrs["last_#{type}_successful_sync_at"] = finished_at attrs["resync_#{type}"] = false
attrs["resync_#{type}"] = false
end
end end
registry.update!(attrs) registry.update!(attrs)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment