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

Not run next job to prevent max execution time exceeded #4

Closed arxeiss closed 6 years ago

arxeiss commented 6 years ago

See #3 :

To prevent Maximum execution time of XX seconds exceeded error, I added new option --max_exec_time which is automatically set to ini_get('max_execution_time') - 5 seconds. If scripts reach this limit, next job will not be run. Of course, if there is no limit, it set automatically 0, which means run forever.

arxeiss commented 6 years ago

Sorry for bad git flow. Now have I noticed, that this pull request contains also commit from #2 :/

orobogenius commented 6 years ago

It's no problem, I've already merged #2 into dev and I've changed the base branch to dev so that won't be an issue.

arxeiss commented 6 years ago

Exactly as you said. To give some time to worker stop self before the error will kill the process. Let's check the new comment I added in #3 .

arxeiss commented 6 years ago

Thank you for accepting and more important, rewriting the README and explanation 👍 much more clear than my original 😃