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