Skip to content

Commit

Permalink
remove group reference on cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
colinthomas-z80 committed Sep 4, 2024
1 parent c5f51a5 commit 65051f5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions taskvine/src/manager/vine_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -5279,6 +5279,14 @@ int vine_cancel_by_task_id(struct vine_manager *q, int task_id)
return 0;
}

if (task->group_id && (task->refcount > 1)) {
struct list *l = hash_table_lookup(q->task_group_table, task->group_id);
if (l) {
list_remove(l, task);
}
vine_task_delete(task);
}

reset_task_to_state(q, task, VINE_TASK_RETRIEVED);

task->result = VINE_RESULT_CANCELLED;
Expand Down

0 comments on commit 65051f5

Please sign in to comment.