Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php namespace App\Listeners\Queue;
- use Illuminate\Support\Facades\Log;
- use Illuminate\Queue\Events\Looping;
- class ShouldQueueWorkerContinue
- {
- public function handle(Looping $eventLooping)
- {
- // Query a service or database here to determine
- // if the $eventLooping->connectionName worker
- // should be paused.
- if ($isPaused) {
- Log::info("The queue worker {$eventLooping->connectionName} is PAUSED, not processing any jobs.");
- }
- return !$isPaused;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement