Answer the question
In order to leave comments, you need to log in
How to loop through code in laravel?
There are unlimited VK pages. I need to constantly monitor changes on them, as soon as an update appears on any, I need to enter these updates into my database.
I'm thinking of doing this in Laravel's turn of the queue (run 10 workers at the same time). Make a Job that will check information about the transferred VK page. When the Job is finished, it will add a copy of itself to the end of the queue to check the page information again. The only problem is that if this Job fails (I know about the automatic restart of failed Jobs, but suddenly all attempts to restart fail), it will not restart itself. How to solve this problem?
Answer the question
In order to leave comments, you need to log in
In normal queues, if the job has not been completed, then it will return to the queue itself, you can even configure when. I don't know what's in Laravel out of the box, but the logic is generally good. Although I would take the filling of the queue into a separate mechanism, because pages can become both more and less over time, and such an algorithm goes into a fixed cycle
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question