A new life for a Craft 2 plugin
A client of us had a site that had a problem processing 'jobs'. They frequently failed or were stalled, blocking any further job processing.
Luckily, we once created a Craft 2 task runner plugin (the craft taskrunner plugin) that could process the Craft jobs async by a cron job, instead of through Control Panel Ajax requests.
However, there appeared to be also a problem with a job itself, causing exceptions and a task to get stalled. The job was created by a 3rd party plugin, and probably related to concurrent database inserts or updates.
Hence we modified the plugin to implement a feature that is hugely missed in Craft 2 and Craft 3 task management: the possibility to automatically retry a job several times before it fails.
Now all jobs are being processed correctly, and the site runs fine again.