Commit 5e43724c authored by Imre Farkas's avatar Imre Farkas

Merge branch 'mmj-lock-unique-to-project' into 'master'

Change lock key in ProjectRecalculateWorker to `project.id`

See merge request gitlab-org/gitlab!67297
parents d36dde8d 1b20c090
...@@ -26,7 +26,7 @@ module AuthorizedProjectUpdate ...@@ -26,7 +26,7 @@ module AuthorizedProjectUpdate
private private
def lock_key(project) def lock_key(project)
"#{self.class.name.underscore}/#{project.root_namespace.id}" "#{self.class.name.underscore}/projects/#{project.id}"
end end
end end
end end
...@@ -43,7 +43,7 @@ RSpec.describe AuthorizedProjectUpdate::ProjectRecalculateWorker do ...@@ -43,7 +43,7 @@ RSpec.describe AuthorizedProjectUpdate::ProjectRecalculateWorker do
end end
context 'exclusive lease' do 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 } let(:timeout) { 10.seconds }
context 'when exclusive lease has not been taken' do 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