When no work is found, return false fast.
This commit is contained in:
parent
cf9fb4398a
commit
e467a75d07
1 changed files with 5 additions and 0 deletions
|
|
@ -111,6 +111,11 @@ abstract class AbstractQueueWorker extends AbstractWorker
|
|||
$items = $this->queueService->pop($this->inputQueue);
|
||||
$this->resultItems = [];
|
||||
|
||||
// If there are no items popped, return fast.
|
||||
if(count($items) == 0){
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($items as $item) {
|
||||
try {
|
||||
$processResults = $this->process($item);
|
||||
|
|
|
|||
Loading…
Reference in a new issue