Skip to content

Commit 5e79b14

Browse files
committed
fix for delay argument being DateTime
1 parent 606d755 commit 5e79b14

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/FintechFab/LaravelQueueRabbitMQ/Queue/RabbitMQQueue.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use AMQPException;
77
use AMQPExchange;
88
use AMQPQueue;
9+
use DateTime;
910
use FintechFab\LaravelQueueRabbitMQ\Queue\Jobs\RabbitMQJob;
1011
use Illuminate\Contracts\Queue\Queue as QueueContract;
1112
use Illuminate\Queue\Queue;
@@ -208,13 +209,14 @@ private function declareQueue($name)
208209
/**
209210
* @param string $destination
210211
*
211-
* @param int $delay
212+
* @param DateTime|int $delay
212213
*
213214
* @return AMQPQueue
214215
*/
215216
private function declareDelayedQueue($destination, $delay)
216217
{
217218
$destination = $this->getQueueName($destination);
219+
$delay = $this->getSeconds($delay);
218220
$name = $destination . '_deferred_' . $delay;
219221

220222
$queue = new AMQPQueue($this->channel);

0 commit comments

Comments
 (0)