You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Heartbeats are a way to let a queued job ping and say "I'm still alive don't kill me!" Some jobs may run for 5 minutes or 5 hours. Instead of setting the timeout to 5 hours, we can leave it low and send a heartbeat within that interval to keep it running.
I have already added this to my library but it seems like it could be useful to the wider community and it is extremely simple.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Heartbeats are a way to let a queued job ping and say "I'm still alive don't kill me!" Some jobs may run for 5 minutes or 5 hours. Instead of setting the timeout to 5 hours, we can leave it low and send a heartbeat within that interval to keep it running.
I have already added this to my library but it seems like it could be useful to the wider community and it is extremely simple.
https://github.com/laravel-workflow/laravel-workflow/blob/master/src/Activity.php#L95
Here's an example of how it can be used inside of a job.
Now we can set a reasonable job timeout of a few seconds but let ffmpeg run for however long it needs.
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions