How to cancel the queue of laravel

I also use self::dispatch () in the queue to invoke the task itself. It didn"t stop until some conditions were reached. Now I need to stop ahead of time in the middle of the execution. What should I do?

Feb.09,2022

stop the queue directly, clear the queue data, or manually go to the queue database to clear the data you want to clear


Mode 1

after the program listens for a change in a resource (file, database value), it automatically stops throwing an exception.

Mode 2

end the process directly. Without making the situation in Mode 1 in advance, the program cannot make a controllable stop once it is run. This is a dangerous way! Use it carefully! Use it carefully!

  • Laravel queue delay problem

    < H1 > Controller < H1 > <?php namespace App Jobs; use App User; use Illuminate Bus Queueable; use Illuminate Queue SerializesModels; use Illuminate Queue InteractsWithQueue; use Illuminate Contracts Queue ShouldQueue; use Illuminate F...

Menu