mirror of
https://github.com/clearml/clearml-server
synced 2025-01-31 02:46:53 +00:00
When removing a task from a queue change the task state only if the task does not think that it is enqueued in some other place
This commit is contained in:
parent
4b93f1f508
commit
a1956cdd83
@ -150,6 +150,7 @@ class QueueBLL(object):
|
|||||||
task = Task.get(
|
task = Task.get(
|
||||||
company=company_id,
|
company=company_id,
|
||||||
id=task_id,
|
id=task_id,
|
||||||
|
execution__queue=queue_id,
|
||||||
_only=[
|
_only=[
|
||||||
"id",
|
"id",
|
||||||
"company",
|
"company",
|
||||||
@ -169,7 +170,10 @@ class QueueBLL(object):
|
|||||||
status_message="",
|
status_message="",
|
||||||
user_id=user_id,
|
user_id=user_id,
|
||||||
force=True,
|
force=True,
|
||||||
).execute(enqueue_status=None)
|
).execute(
|
||||||
|
enqueue_status=None,
|
||||||
|
unset__execution__queue=1,
|
||||||
|
)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
log.error(
|
log.error(
|
||||||
f"Failed updating task {task_id} status on removal from queue: {queue_id}, {str(ex)}"
|
f"Failed updating task {task_id} status on removal from queue: {queue_id}, {str(ex)}"
|
||||||
|
Loading…
Reference in New Issue
Block a user