Commit 26aefe26 authored by Mike Kozono's avatar Mike Kozono

Rename schedule_checksum_calculation to verify_async

parent 650b4e4f
...@@ -66,7 +66,7 @@ module Geo ...@@ -66,7 +66,7 @@ module Geo
{ model_record_id: model_record.id, blob_path: blob_path } { model_record_id: model_record.id, blob_path: blob_path }
end end
def schedule_checksum_calculation def verify_async
Geo::VerificationWorker.perform_async(replicable_name, model_record.id) Geo::VerificationWorker.perform_async(replicable_name, model_record.id)
end end
end end
......
...@@ -47,7 +47,7 @@ module Geo ...@@ -47,7 +47,7 @@ module Geo
end end
def after_verifiable_update def after_verifiable_update
schedule_checksum_calculation if needs_checksum? verify_async if needs_checksum?
end end
def verify def verify
...@@ -107,7 +107,7 @@ module Geo ...@@ -107,7 +107,7 @@ module Geo
[next_retry_time(retry_count), retry_count] [next_retry_time(retry_count), retry_count]
end end
def schedule_checksum_calculation def verify_async
raise NotImplementedError raise NotImplementedError
end end
end end
......
...@@ -40,8 +40,8 @@ RSpec.shared_examples 'a verifiable replicator' do ...@@ -40,8 +40,8 @@ RSpec.shared_examples 'a verifiable replicator' do
end end
describe '#after_verifiable_update' do describe '#after_verifiable_update' do
it 'schedules the checksum calculation if needed' do it 'calls verify_async if needed' do
expect(replicator).to receive(:schedule_checksum_calculation) expect(replicator).to receive(:verify_async)
expect(replicator).to receive(:needs_checksum?).and_return(true) expect(replicator).to receive(:needs_checksum?).and_return(true)
replicator.after_verifiable_update replicator.after_verifiable_update
......
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