1) First the table is updated with a new 'datetime' column called 'failed'. This one is showing the date when the job hits the maximum. This is useful for debugging and/or making queries.
2) The max attempts was hardcoded in the query. It is now a configurable value. If the max attempts is reached, update the failed column with the current datetime.
3) Bugfix: when a job is failed (max attempts is reached) it was not possible to add the same class/method.
1) First the table is updated with a new 'datetime' column called 'failed'. This one is showing the date when the job hits the maximum. This is useful for debugging and/or making queries.
2) The max attempts was hardcoded in the query. It is now a configurable value. If the max attempts is reached, update the failed column with the current datetime.
3) Bugfix: when a job is failed (max attempts is reached) it was not possible to add the same class/method.