Refactor project_cache_worker_key
This commit is contained in:
parent
0adedbb482
commit
e6780501cb
2 changed files with 2 additions and 2 deletions
|
@ -42,6 +42,6 @@ class ProjectCacheWorker
|
|||
end
|
||||
|
||||
def project_cache_worker_key(project_id, statistics)
|
||||
(["project_cache_worker", project_id] + statistics.sort).join(":")
|
||||
["project_cache_worker", project_id, *statistics.sort].join(":")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,7 +7,7 @@ describe ProjectCacheWorker do
|
|||
|
||||
let(:worker) { described_class.new }
|
||||
let(:project) { create(:project, :repository) }
|
||||
let(:lease_key) { (["project_cache_worker", project.id] + statistics.sort).join(":") }
|
||||
let(:lease_key) { ["project_cache_worker", project.id, *statistics.sort].join(":") }
|
||||
let(:lease_timeout) { ProjectCacheWorker::LEASE_TIMEOUT }
|
||||
let(:statistics) { [] }
|
||||
|
||||
|
|
Loading…
Reference in a new issue