Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access enqueued_at from Sidekiq worker

Is there a way to get the Sidekick job object from a worker in order to access its enqueued_at attribute? I wanna create records using the enqueued_at timestamp in the created_at/updated_at fields for a Sidekiq queue that's been paused for a long time (and in case I pause it again).

like image 618
Ney Avatar asked Dec 15 '25 00:12

Ney


1 Answers

You can only access job metadata from middleware. If your worker needs data, it must be passed as arguments to the worker.

like image 119
Mike Perham Avatar answered Dec 16 '25 20:12

Mike Perham



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!