Remove the backoff delay

parent eb4a4dcc
......@@ -5,7 +5,6 @@ module Gitlab
VERSION = '0.1.0'.freeze
POOL_WAIT = 5.seconds.freeze
BATCH_SIZE = 250
SYNC_BACKOFF_DELAY = 5.minutes
attr_reader :options
......@@ -122,7 +121,7 @@ module Gitlab
registry.save!
::Geo::ProjectSyncWorker.perform_in(SYNC_BACKOFF_DELAY, event.project_id, Time.now)
::Geo::ProjectSyncWorker.perform_async(event.project_id, Time.now)
end
def handle_repository_updated(event_log)
......@@ -139,7 +138,7 @@ module Gitlab
registry.save!
::Geo::ProjectSyncWorker.perform_in(SYNC_BACKOFF_DELAY, event.project_id, Time.now)
::Geo::ProjectSyncWorker.perform_async(event.project_id, Time.now)
end
def handle_repository_deleted(event_log)
......
......@@ -62,8 +62,8 @@ describe Gitlab::Geo::LogCursor::Daemon, :postgresql do
end
it 'performs Geo::ProjectSyncWorker' do
expect(Geo::ProjectSyncWorker).to receive(:perform_in)
.with(anything, project.id, anything).once.and_return(spy)
expect(Geo::ProjectSyncWorker).to receive(:perform_async)
.with(project.id, anything).once.and_return(spy)
subject.run!
end
......@@ -102,8 +102,8 @@ describe Gitlab::Geo::LogCursor::Daemon, :postgresql do
end
it 'performs Geo::ProjectSyncWorker' do
expect(Geo::ProjectSyncWorker).to receive(:perform_in)
.with(anything, project.id, anything).once.and_return(spy)
expect(Geo::ProjectSyncWorker).to receive(:perform_async)
.with(project.id, anything).once.and_return(spy)
subject.run!
end
......@@ -171,7 +171,7 @@ describe Gitlab::Geo::LogCursor::Daemon, :postgresql do
before do
allow(subject).to receive(:exit?).and_return(false, true)
allow(Geo::ProjectSyncWorker).to receive(:perform_in).and_return(spy)
allow(Geo::ProjectSyncWorker).to receive(:perform_async).and_return(spy)
end
it 'replays events for projects that belong to selected namespaces to replicate' do
......
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