Similar to timerTaskProcessor, worker task can also be deleted within the transaction on completion.
This would reduce the chance that worker task re-execute which could cause more database requests.
For example, after completion, if workerTaskQueue got closed before committing/deleting the worker tasks, the same task will be reloaded and executed again.
This will be easier to understand as well -- currently when worker task backoff retry, it will be converted into a timer task(which means the worker task got deleted during processing)
Similar to timerTaskProcessor, worker task can also be deleted within the transaction on completion.
This would reduce the chance that worker task re-execute which could cause more database requests.
For example, after completion, if workerTaskQueue got closed before committing/deleting the worker tasks, the same task will be reloaded and executed again.
This will be easier to understand as well -- currently when worker task backoff retry, it will be converted into a timer task(which means the worker task got deleted during processing)