orobogenius / sansdaemon

Batch process Laravel Queue without a daemon; Processes queue jobs and kills the process
https://medium.com/@orobogenius/laravel-queue-processing-on-shared-hosting-dedd82d0267a
MIT License
176 stars 17 forks source link

Love this package #14

Closed garhbod closed 4 years ago

garhbod commented 4 years ago

I was using a scheduled job to check if queue:work was still running but I'm sure you probably already know that doesn't work the best. With this package is a god send. Just set the below and it's pretty close to queue:work running continuously

$schedule->command(
    'queue:work --timeout=80 --sleep=3 --tries=5 --sansdaemon --max_exec_time=200'
)->everyFiveMinutes()
garhbod commented 4 years ago

Only gripe would be that there is no mention of --max_exex_time being seconds in the README

orobogenius commented 4 years ago

I'm glad you find the package helpful @garhbod.

About --max-exec-time, even though the README does exactly state --max_exec_time to be in seconds, it does provide a reference to max_execution_time. In the README, this value defaults to whatever the max_execution_time in your PHP runtime is, minus 5 seconds - ini_get('max_execution_time') - 5s.