Feb 19, 2018
0
Level 1
Laravel 5.1 dispatch job with tries override?
On my Forge Server I have configured a beanstalkd worker with Tries set to 3. From a Console command, I am dispatching a Job to send emails, such as:
$job = ( new SendEmail($message) );
$this->dispatch($job);
This works as expected, however there are instances where I'd like to override the tries parameter and have this Job only be attempted one time.
With later versions of Laravel you can set this from within the Job class, such as:
public $tries = 1;
Is there a way to achieve this in Laravel 5.1?
Thanks in advance for any help!
Please or to participate in this conversation.