diff --git a/taskvine/src/manager/vine_manager.c b/taskvine/src/manager/vine_manager.c index f2e73ae2fd..87a70ca7ce 100644 --- a/taskvine/src/manager/vine_manager.c +++ b/taskvine/src/manager/vine_manager.c @@ -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;