Helper for making an async function stubborn (retry the operation on failure)