Ugrás a tartalomra
523_

YouTube Laravel Daily

Laravel Queues: 11 Must-Know Advanced Tips

Laravel Queues: 11 Must-Know Advanced Tips
Check out Skyline: https://boring-observability.dev/skyline (25% off with LARAVELDAILY coupon)

Original article "Laravel Background Jobs: 12 Best Practices for Production Queues" https://boring-observability.dev/blog/laravel-background-jobs-best-practices

00:00 Intro
02:34 1. Keep arguments small
05:01 2. Every job should declare its queue
07:12 3. Make jobs idempotent
09:25 4. Keep jobs atomic and short
11:29 5. Handle retries and backoff
13:27 6. Dispatch after the transaction commits
15:19 7. ShouldBeUnique and uniqueId()
17:16 8. Never bulk or batch a unique job
18:50 9. A batchable job must honour cancellation
20:29 10. Don't sleep() in a job
22:11 11. Keep jobs backwards compatible across deploys

Support the channel by checking out my products:
- My Laravel courses: https://laraveldaily.com/courses
- Filament examples: https://filamentexamples.com
- Advertise on the channel: http://laraveldaily.com/advertising

Other places to follow:
- My weekly Laravel newsletter: https://laraveldaily.com/newsletter
- My personal Twitter: https://twitter.com/povilaskorop