New Feature: Auto Retry for IronWorker
Overview
IronWorker now has an auto-retry feature that, if enabled, will automatically retry your tasks if they error out. You can set the number of times it should retry and the delay between retries.
Usage
While uploading your worker, simply set the retries and retries-delay parameters:
iron_worker upload my_worker --retries 5 --retries-delay 10
That example will retry 5 times (which means it will try up to six total times) and will wait 10 seconds between each retry. If any of those tasks is successful, it will stop retrying. In other words, it will continue to retry if each task in the sequence errors.
Be sure your tasks are idempotent when using this so that multiple runs don't have any side effects.
Cheers, and let us know how it works for you.
Related Reading: Top 10 uses of ironworker
Achieve Cloud Elasticity with Iron
Speak to us to find how you can achieve cloud elasticity with a serverless messaging queue and background task solution with free handheld support.
Is there a way of setting retries from the UI at hud.iron.io?
Hey Adam, not at this time, no.. but sounds like a good feature to add. Currently it’s set for the code package on upload. (per the code above).
If you’d like you can request and follow a feature here: https://github.com/iron-io/issues/issues