mirror of
https://github.com/SrIzan10/hc-harbor.git
synced 2026-05-01 10:45:21 +00:00
Silence ConcurrencyExceededError
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
class AttemptProjectRepoMappingJob < ApplicationJob
|
||||
queue_as :latency_10s
|
||||
|
||||
include GoodJob::ActiveJobExtensions::Concurrency
|
||||
include HasEnqueueControl
|
||||
|
||||
good_job_control_concurrency_with(
|
||||
total_limit: 1,
|
||||
|
||||
@@ -11,4 +11,12 @@ module HasEnqueueControl
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
def perform(*args)
|
||||
super
|
||||
rescue GoodJob::ActiveJobExtensions::Concurrency::ConcurrencyExceededError
|
||||
msg = "Concurrency limit exceeded for #{self.class.name}"
|
||||
msg += " with args: #{args.inspect}" if args.present?
|
||||
Rails.logger.info msg
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user