Commit 1b20c090 authored by Manoj M J's avatar Manoj M J

Change lock key in ProjectRecalculateWorker

This MR makes a tiny change in the
lock key in ProjectRecalculateWorker, so
that the lock is based on the project id.
parent 41abeb0f
......@@ -26,7 +26,7 @@ module AuthorizedProjectUpdate
private
def lock_key(project)
"#{self.class.name.underscore}/#{project.root_namespace.id}"
"#{self.class.name.underscore}/projects/#{project.id}"
end
end
end
......@@ -43,7 +43,7 @@ RSpec.describe AuthorizedProjectUpdate::ProjectRecalculateWorker do
end
context 'exclusive lease' do
let(:lock_key) { "#{described_class.name.underscore}/#{project.root_namespace.id}" }
let(:lock_key) { "#{described_class.name.underscore}/projects/#{project.id}" }
let(:timeout) { 10.seconds }
context 'when exclusive lease has not been taken' 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