Skip to content

Commit fcdea3f

Browse files
authored
Merge pull request vyuldashev#97 from sweetvvck/patch-1
[5.3] Fix wrong implements of default attempt count
2 parents c01f802 + a327587 commit fcdea3f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/VladimirYuldashev/LaravelQueueRabbitMQ/Queue/Jobs/RabbitMQJob.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ class RabbitMQJob extends Job implements JobContract
2424
/**
2525
* Creates a new instance of RabbitMQJob.
2626
*
27-
* @param \Illuminate\Container\Container $container
27+
* @param \Illuminate\Container\Container $container
2828
* @param \VladimirYuldashev\LaravelQueueRabbitMQ\Queue\RabbitMQQueue $connection
29-
* @param \PhpAmqpLib\Channel\AMQPChannel $channel
30-
* @param string $queue
31-
* @param \PhpAmqpLib\Message\AMQPMessage $message
29+
* @param \PhpAmqpLib\Channel\AMQPChannel $channel
30+
* @param string $queue
31+
* @param \PhpAmqpLib\Message\AMQPMessage $message
3232
*/
3333
public function __construct(
3434
Container $container,
@@ -59,7 +59,8 @@ public function attempts()
5959
}
6060
}
6161

62-
return 0;
62+
// set default job attempts to 1 so that jobs can run without retry
63+
return 1;
6364
}
6465

6566
/**

0 commit comments

Comments
 (0)