Create a job queue tasks

1. Create a database-driven storage tasks

$ php artisan queue:table
$ php artisan migrate
Migrating: 213822_create_jobs_table
Migrated:  213822_create_jobs_table

2, create a task class

php artisan make:job SendReminderEmail

3, processing failed mission

$ php artisan queue:failed-table
$ php artisan migrate

4, execution queue

php artisan queue:work --tries=3

 

Guess you like

Origin www.cnblogs.com/xkfeng/p/11546090.html