Make Geo::BaseSyncService#update_registry clearer

parent aff0e5e2
......@@ -54,16 +54,14 @@ module Geo
log("Updating #{type} sync information")
attrs = {}.tap do |attrs|
if started_at
attrs["last_#{type}_synced_at"] = started_at
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
end
registry.update!(attrs)
end
......
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