amitRoy1999 wrote a reply+100 XP
5mos ago
amitRoy1999 wrote a reply+100 XP
5mos ago
Thank you all for your suggestions. I also looked in other places and implemented your solutions, but the main issue with these approaches is that the job actually gets initiated every time — the worker starts the job, then goes to sleep or something else happens, and the job fails because of multiple retries. So the conclusion I came to is to add a new supervisor with a low max worker count, because I have many jobs in my app and modifying every job and handling all the edge cases would take a lot of time.
amitRoy1999 started a new conversation+100 XP
5mos ago
I am using Laravel 11 with Horizon and a Redis queue. I have a job that runs daily — I dispatch 500 instances of this job for 500 numbers. The job calls an external API and updates my database; it takes 10–20 minutes depending on the API response. I want to know if there’s a simple configuration available where I can define, by job name, that only 100 concurrent instances of a given job class can run at a time. It would be great if there’s a solution at the supervisor level where a job won’t even start if the maximum concurrency for that job is reached, and when one finishes, the next job in the queue starts. I also don’t want to add another supervisor configuration for this.