Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3644 from astelmashenko/bugfix/message-queue-dead…
Browse files Browse the repository at this point in the history
…-tasks

removing dead tasks from queue message
  • Loading branch information
v1r3n authored Jun 8, 2023
2 parents e11a3e7 + a709ad2 commit 878fcd9
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ public void execute(WorkflowSystemTask systemTask, String taskId) {
TaskModel task = loadTaskQuietly(taskId);
if (task == null) {
LOGGER.error("TaskId: {} could not be found while executing {}", taskId, systemTask);
try {
LOGGER.debug(
"Cleaning up dead task from queue message: taskQueue={}, taskId={}",
systemTask.getTaskType(),
taskId);
queueDAO.remove(systemTask.getTaskType(), taskId);
} catch (Exception e) {
LOGGER.error(
"Failed to remove dead task from queue message: taskQueue={}, taskId={}",
systemTask.getTaskType(),
taskId);
}
return;
}

Expand Down

0 comments on commit 878fcd9

Please sign in to comment.