-
Notifications
You must be signed in to change notification settings - Fork 275
Debugging a failed SolidQueue job
Keith Schacht edited this page May 5, 2024
·
1 revision
In the logs find the job_id from an entry such as this:
[SolidQueue] Claimed 1 jobs
I, [2024-04-29T18:23:10.309082 #91] INFO -- : [ActiveJob] [GetNextAIMessageJob] [33930e21-87b8-4173-9c6e-edc5e39ecf4b] Performing GetNextAIMessageJob (Job ID: 33930e21-87b8-4173-9c6e-edc5e39ecf4b) from SolidQueue(default) enqueued at 2024-04-29T18:16:29.024459609Z with arguments: 3357, 3
In console you can find the specific job using that Job ID
:
job = SolidQueue::Job.find_by(active_job_id: '33930e21-87b8-4173-9c6e-edc5e39ecf4b')
# or
SolidQueue::Job.where("CAST(arguments AS json) ->> 'job_id' = ?", '33930e21-87b8-4173-9c6e-edc5e39ecf4b')
You can find any failed executions with:
job.failed_executions