Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore outer attempt condition when fetching jobs
In some situations a condition to ensure the attempts don't exceed max attempts is still necessary. By checking the attempts outside the CTE we maintain optimal query performance for the large scan that finds jobs, and only apply the check in the small _outer_ query.
- Loading branch information