chore(sidekiq): log ActiveJob class and job_id on dequeue (#12704)
## Context Sidekiq logs only showed the Sidekiq wrapper class and JID, which wasn’t helpful when debugging ActiveJobs. ## Changes - Updated `ChatwootDequeuedLogger` to log the actual `ActiveJob class` and `job_id` instead of the generic Sidekiq wrapper and JID. > Example > ``` > Dequeued ActionMailer::MailDeliveryJob 123e4567-e89b-12d3-a456-426614174000 from default > ``` - Remove sidekiq worker and unify everything to `ActiveJob`
This commit is contained in:
@@ -9,7 +9,8 @@ end
|
||||
# Logs whenever a job is pulled off Redis for execution.
|
||||
class ChatwootDequeuedLogger
|
||||
def call(_worker, job, queue)
|
||||
Sidekiq.logger.info("Dequeued #{job['class']} #{job['jid']} from #{queue}")
|
||||
payload = job['args'].first
|
||||
Sidekiq.logger.info("Dequeued #{job['wrapped']} #{payload['job_id']} from #{queue}")
|
||||
yield
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user