简体   繁体   中英

Does Laravel Support Timeout Option for Queue Workers?

I know Laravel has a --timeout option for their php artisan queue:listen command, however I would like to use queue:work instead to save some CPU usage. As far as I can tell, there isn't a way to set the timeout option with the queue worker. Will it time out if my job takes more than the 60 second default, or does the timeout just apply to queue:listen ?

I just want to make sure my jobs have enough time to run since I'm doing things like running reports in the background, and some take more than 60 seconds to generate due to the size of the dataset. It seems like they're running ok, I just want some clarification as to how that works so that I can make sure I won't run into issues.

the --timeout is an artificial timeout in Symphony's Process class.

If you're using supervisord, it shouldn't time out, but you might want to look at your PHP max_execution_time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM