Skip to content

Find out who enqueued a job and where #1544

Answered by Earlopain
amo13 asked this question in Q&A
Discussion options

You must be logged in to vote

In GoodJob itself, there is nothing for this. I think it would be pretty expensive to store the backtrace eagerly on enqueue. Rails has some things that might help you out though.

There is active_job.log_query_tags_around_perform to write to logs where a job got enqueued from. That one is more of a dev option, and only enabled there by default. The usefulness in production doesn't seem that high.

You could also try the instrumentation api, there is an event when a job got enqueued: enqueue.active_job. It contains the job payload and may help you understand what's going on. caller should include the enqueue source (but I have not tested this).

I'm not sure how helpful this information will…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@amo13
Comment options

@Earlopain
Comment options

Answer selected by amo13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants