简体   繁体   中英

Queued Laravel queued job runs twice after upgrading to Laravel 5.4

We used to run Laravel 5.2, and for one of our processing tasks, we'd run a console command to queue up a job into a Redis queue. Prior to the Laravel 5.4 upgrade, this job would queue up and would get picked up by a queue daemon and would only run once. After the upgrade, however, the job gets picked up twice, about 1 minute apart. There have been zero devops changes so I am trying to figure out what Laravel is doing differently. I can also verify that the console command only queues up the job once, so there is something that has changed with how the daemons are running. Has anyone else seen behavior like this?

Just read this today. Don't know if it will help help.

From the docs:

"The --timeout value should always be at least several seconds shorter than your
retry_after configuration value. This will ensure that a worker processing a given job is always killed before the job is retried. If your --timeout option is longer than your retry_after configuration value, your jobs may be processed twice."

https://laravel.com/docs/5.6/queues#queue-workers-and-deployment

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM