Hello guys, i have an Laravel application deployed on digitalocean and my app do some jobs. I already have this scheduler configuration:
/**
* Define the application's command schedule.
*/
protected function schedule(Schedule $schedule): void
{
$schedule->command('queue:work --queue=process_photo')
->withoutOverlapping()
->everyMinute();
}
i have also set up cron, which execute artisan command schedule:run every minute.
But i have a problem because it's too slow for my needs. I'm considering to solve this problem with set up multiple containers on digital ocean, for example 4 containers, which has be do that job, but i'm not sure how i can prevent to execute one job twice, so on two servers in the same time.
I know there is an option onOneServer(), but i'm not sure how it works. I will be glad for every suggestion, thank you :)