why should you need the id? It does not seem related to your requirements?
Dispatch Queue Job with Delay and Get Job ID
Hello,
I'm currently working on a Laravel 10 project where I have a unique requirement in my job processing logic. Within a job, I perform an API check to determine the status of an order. If the order status is not 'delivered', I use the $this->release($this->getNextDelay()); function to requeue the job with a delay, intending to send another API request at a later time.
Problem
My issue arises with tracking the job IDs for these delayed jobs. When I call $this->job->getJobId();, it returns the ID of the current job instance, which is expected. However, I need to obtain the ID of the newly created delayed job (the job instance created by $this->release()).
Is there a way in Laravel 10 to retrieve the job ID of a job that has been requeued using $this->release? Any guidance or workaround to track these delayed job IDs would be greatly appreciated.
Please or to participate in this conversation.