Reputation: 441
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).
Upvotes: 3
Views: 1063
Reputation: 22208
You can only access job metadata from middleware. If your worker needs data, it must be passed as arguments to the worker.
Upvotes: 4