When no work is found, return false fast.

This commit is contained in:
Greyscale 2020-11-22 18:10:03 +01:00
parent cf9fb4398a
commit e467a75d07
No known key found for this signature in database
GPG key ID: C6178C19949CFFE3

View file

@ -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);