Question about how a queue working
rifttech opened this issue · 2 comments
rifttech commented
Is the same row in queue table picked twice or more for task processing if processing mode is USE EXTERNAL EXECUTOR and task takes time to executes?
if so how to avoid it?
f0y commented
If a task is picked up then it immediately postponed. Postpone duration is specified in https://github.com/yoomoney/db-queue/blob/master/db-queue-core/src/main/java/ru/yoomoney/tech/dbqueue/settings/FailureSettings.java#L21
So if task proccessing takes time longer than postpone duration then it will be picked up second time.
This behaviour is relevant to all tasks processing modes.
You can avoid it by specifiying long postpone duration.
rifttech commented
much obliged.