Skip to content

Commit 143ebc5

Browse files
committed
without interruption polling method
1 parent 6db9349 commit 143ebc5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Illuminate/Queue/QueueManager.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,19 @@ public function isPaused($connection, $queue)
254254
->get("illuminate:queue:paused:{$connection}:{$queue}", false);
255255
}
256256

257+
/**
258+
* Indicate that queue workers should not poll for restart or pause signals.
259+
*
260+
* This prevents the workers from hitting the application cache to determine if they need to pause or restart.
261+
*
262+
* @return void
263+
*/
264+
public function withoutInterruptionPolling()
265+
{
266+
Worker::$restartable = false;
267+
Worker::$pausable = false;
268+
}
269+
257270
/**
258271
* Add a queue connection resolver.
259272
*

0 commit comments

Comments
 (0)