1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 13:24:03 +00:00
laravel-tips/content/tips/use-retry-for-callbacks-that-may-randomly-fail.md
2022-01-07 18:35:45 +01:00

525 B

title tweet_id thread_slug author_username images created_at slug
Use retry() for callbacks that may randomly fail 1471864638199451648 weekly-thread-2021-50 alexjgarrett
https://pbs.twimg.com/media/FGP3MSQWQAYKjSm.jpg
2021-12-17T15:27:30+00:00 use-retry-for-callbacks-that-may-randomly-fail

.@laravelphp out here helping me again, with its helpers!

I was hitting a shaky API that sometimes failed.

Here, the retry function tries the callback 3 times, with a 2 second interval in-between retries.