Answer the question
In order to leave comments, you need to log in
Can I check if the current task is running in the queue(database)?
I have some Job which in the handle dispatches a new instance of itself with a certain delay. Can I somehow check before the very first dispatch whether this task is already in the queue?
I need all this to loop a job that will work after a certain period of time. And at some point it will be necessary to interrupt this cycle, and also check whether this job is running at all.
Laravel 8
Answer the question
In order to leave comments, you need to log in
In general, I did everything through Atomic Lock. I created the keys, and inside the job I looked whether the key was locked. Further, everything worked with a bang
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question