Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
zoe
main
Commits
91e143eb
Commit
91e143eb
authored
Jan 06, 2017
by
Daniele Venzano
Browse files
Cannot delete executions that are running since termination is asynchronous
parent
1852c8d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
zoe_api/api_endpoint.py
View file @
91e143eb
...
...
@@ -101,9 +101,7 @@ class APIEndpoint:
raise
zoe_api
.
exceptions
.
ZoeAuthException
()
if
e
.
is_active
():
status
,
message
=
self
.
execution_terminate
(
uid
,
role
,
exec_id
)
if
not
status
:
raise
zoe_api
.
exceptions
.
ZoeException
(
message
)
raise
zoe_api
.
exceptions
.
ZoeException
(
'Cannot delete an active execution'
)
status
,
message
=
self
.
master
.
execution_delete
(
exec_id
)
if
status
:
...
...
zoe_master/execution_manager.py
View file @
91e143eb
...
...
@@ -61,5 +61,6 @@ def restart_resubmit_scheduler(state: SQLManager, scheduler: ZoeScheduler):
def
execution_delete
(
scheduler
:
ZoeScheduler
,
execution
:
Execution
):
"""Remove an execution from the scheduler, must only be called if the execution is NOT running."""
assert
not
execution
.
is_active
()
exec_logs
.
delete
(
execution
)
scheduler
.
remove_execution
(
execution
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment