Silence ConcurrencyExceededError

This commit is contained in:
Max Wofford
2025-06-08 21:04:55 -04:00
parent 204cf2d188
commit 31169c5b2b
2 changed files with 9 additions and 2 deletions

View File

@@ -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,

View File

@@ -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