blob: 282a8f546951ed390a800dc0015c753cc65f6e58 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# frozen_string_literal: true
module ObjectPool
class JoinWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
sidekiq_options retry: 3
include ObjectPoolQueue
worker_resource_boundary :cpu
# The use of pool id is deprecated. Keeping the argument allows old jobs to
# still be performed.
def perform(_pool_id, project_id)
project = Project.find_by_id(project_id)
return unless project&.pool_repository&.joinable?
project.link_pool_repository
Repositories::HousekeepingService.new(project).execute
end
end
end
|