laravel-queue

Laravel - Set queue delay dynamically for event listener

谁说我不能喝 提交于 2020-12-15 07:01:29
问题 Based on the documentation of Laravel to delay the job, we can add a $delay properties on the listener class (https://laravel.com/docs/8.x/events). I am trying to customize the $delay time in seconds that based on my start time and end time. From documentation which it's work fine: /** * The time (seconds) before the job should be processed. * * @var int */ public $delay = 60; I am trying to: public $delay; public function __construct ($event) { $this->delay= $event->seconds; } and I tried

Laravel - Set queue delay dynamically for event listener

*爱你&永不变心* 提交于 2020-12-15 07:01:27
问题 Based on the documentation of Laravel to delay the job, we can add a $delay properties on the listener class (https://laravel.com/docs/8.x/events). I am trying to customize the $delay time in seconds that based on my start time and end time. From documentation which it's work fine: /** * The time (seconds) before the job should be processed. * * @var int */ public $delay = 60; I am trying to: public $delay; public function __construct ($event) { $this->delay= $event->seconds; } and I tried

Cancel Jobs In Laravel

好久不见. 提交于 2020-08-09 07:00:20
问题 If I call the following: return AdventureJob::dispatch($event->character->refresh(), $event->adventure, $event->levelsAtATime)->delay($timeTillFinished); This will then create a job thats delayed x minutes. my jobs are all processed through redis, is there a way to then get this specific job or delete this specific job from the queue? People talk about php artisan commands to then delete all jobs, thats not what I want I want to get some kind of information (Job ID? or queue ID? Redis ID?)

laravel job/notification failing

耗尽温柔 提交于 2020-02-28 07:14:06
问题 I am trying to set up a contact form on my site whereby when someone clicks send, then a job is run and in that job, a notification is sent to all admin users. I keep getting this error in my failed jobs table though: Illuminate\Database\Eloquent\ModelNotFoundException: No query results for model [App\Contact]. in /var/www/html/leonsegal/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:412 I have been all over my code and I can't see what I have done wrong. Would anyone