Remove the backoff delay

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