From a9086c7cad0c71e2b8cb8d6714d11f9035c5256f Mon Sep 17 00:00:00 2001 From: Pablo Morales Date: Tue, 11 Oct 2016 17:26:39 +0200 Subject: [PATCH] Use interval value instead of hardcoded values --- src/Driver/PhpAmqpDriver.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Driver/PhpAmqpDriver.php b/src/Driver/PhpAmqpDriver.php index fbd036c7..40d71c5c 100644 --- a/src/Driver/PhpAmqpDriver.php +++ b/src/Driver/PhpAmqpDriver.php @@ -92,12 +92,12 @@ public function pushMessage($queueName, $message) * * @return array An array like array($message, $receipt); */ - public function popMessage($queueName, $interval = 5) + public function popMessage($queueName, $interval = 10000) { $message = $this->getChannel()->basic_get($queueName); if (!$message) { // sleep for 10 ms to prevent hammering CPU - usleep(10000); + usleep($interval); return [null, null]; }