Make Geo::BaseSyncService#update_registry clearer

parent aff0e5e2
......@@ -54,15 +54,13 @@ module Geo
log("Updating #{type} sync information")
attrs = {}.tap do |attrs|
if started_at
attrs["last_#{type}_synced_at"] = started_at
end
if finished_at
attrs["last_#{type}_successful_sync_at"] = finished_at
attrs["resync_#{type}"] = false
end
attrs = {}
attrs["last_#{type}_synced_at"] = started_at if started_at
if finished_at
attrs["last_#{type}_successful_sync_at"] = finished_at
attrs["resync_#{type}"] = false
end
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