Answers for "laravel jobs"

PHP
2

run jobs laravel

php artisan queue:work --queue=high,default
Posted by: Guest on February-04-2021
1

execute job callback laravel

Queue::after(function (JobProcessed $event) {
// $event->connectionName
// $event->job
// $event->job->payload()
});
Posted by: Guest on October-18-2020
0

laravel jobs

use Illuminate\Support\Facades\Redis;

/**
 * Execute the job.
 *
 * @return void
 */
public function handle()
{
    Redis::throttle('key')->block(0)->allow(1)->every(5)->then(function () {
        info('Lock obtained...');

        // Handle job...
    }, function () {
        // Could not obtain lock...

        return $this->release(5);
    });
}
Posted by: Guest on May-18-2021

Browse Popular Code Answers by Language