Commit f2374aba authored by Mike Kozono's avatar Mike Kozono

Move verify_async to VerifiableReplicator concern

parent 2812f154
...@@ -65,9 +65,5 @@ module Geo ...@@ -65,9 +65,5 @@ module Geo
def deleted_params def deleted_params
{ model_record_id: model_record.id, blob_path: blob_path } { model_record_id: model_record.id, blob_path: blob_path }
end end
def verify_async
Geo::VerificationWorker.perform_async(replicable_name, model_record.id)
end
end end
end end
...@@ -50,6 +50,10 @@ module Geo ...@@ -50,6 +50,10 @@ module Geo
verify_async if needs_checksum? verify_async if needs_checksum?
end end
def verify_async
Geo::VerificationWorker.perform_async(replicable_name, model_record.id)
end
def verify def verify
checksum = model_record.calculate_checksum checksum = model_record.calculate_checksum
update_verification_state!(checksum: checksum) update_verification_state!(checksum: checksum)
...@@ -106,9 +110,5 @@ module Geo ...@@ -106,9 +110,5 @@ module Geo
retry_count = model_record.verification_retry_count.to_i + 1 retry_count = model_record.verification_retry_count.to_i + 1
[next_retry_time(retry_count), retry_count] [next_retry_time(retry_count), retry_count]
end end
def verify_async
raise NotImplementedError
end
end end
end 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