简体   繁体   English

如何手动释放Laravel中所有排队的作业?

[英]How to manually release all the queued jobs in Laravel?

I need to know if there is a way to use the internal laravel api to force the release of all queued jobs. 我需要知道是否存在使用内部laravel API强制释放所有排队作业的方法。 The reason is that we have a queue implementation and there we have a mechanism that releases the execution of a job 5 minutes, if there was a problem during the job execution. 原因是我们有一个队列实现,并且有一个机制可以在作业执行过程中出现问题的情况下,在5分钟内释放作业的执行。 The problem is that is required to have some sort of refresh feature that triggers all of those "delayed" jobs manually, since we need a bit of control of when to run those delayed jobs, keeping the fail-safe mechanism intact. 问题在于,需要具有某种刷新功能来手动触发所有这些“延迟”作业,因为我们需要控制何时运行这些延迟作业,从而保持故障保护机制的完整性。 There is some way to implement this using Laravel?? 有一些方法可以使用Laravel来实现?

You can run the php artisan queue:work commando to start the Queue Work. 您可以运行php artisan queue:work突击队来启动Queue Work。 If you wish start this from the code, you can call this command programmatically 如果希望从代码开始,可以以编程方式调用此命令

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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