We are using Laravel Jobs + Horizon, and have built a framework to retry jobs with exponential backoff using the hook for failed() as well as Job middleware to deal with log consolidation, but we've not been able to solve cleanly the following problem:
The subclass job implementation experiences and throws a specific error, let's say a guzzle 429 error - in these cases, we simply want the job be started over, with delay - so we don't want the job to fail, we don't want it to complete, we just want to redispatch it - but the only way we detect this is in failed, which appears to be too late.
Is there a mechanism to catch these earlier than the failed hook, or a mechanism to unfail them?