# ATTENTION: Uncomment this line to enable info logging again
definfo(*);end
defenqueue(event)
superifjob_enqueued?(event)
end
defenqueue_at(event)
superifjob_enqueued?(event)
end
private
defjob_enqueued?(event)
job=event.payload[:job]
# having a provider_job_id means that the job was enqueued
returntrueifjob.provider_job_id.present?
# we're only interested to log not enqueued lock-jobs for now
returnfalseif!job.is_a?(HasActiveJobLock)
infodo
"Won't enqueue #{job.class.name} (Job ID: #{job.job_id}) to #{queue_name(event)}"+args_info(job)+" because of already existing Job with Lock Key '#{job.lock_key}'."