mirror of
https://github.com/clearml/clearml-session
synced 2025-03-16 08:27:02 +00:00
Delete old sessions after SSH connection established only if restoring a workspace, otherwise delete at setup time
This commit is contained in:
parent
d3ffdf92e8
commit
cb4e63515a
@ -1492,9 +1492,12 @@ def cli():
|
|||||||
# ask user final approval
|
# ask user final approval
|
||||||
ask_launch(args)
|
ask_launch(args)
|
||||||
|
|
||||||
# remove old Tasks created by us.
|
# remove old Tasks created by us, unless we have to restore workspace,
|
||||||
# (now we do it Only after a successful remote session)
|
if state.get("store_workspace") or state.get("continue_session"):
|
||||||
delete_old_tasks_callback = partial(delete_old_tasks, state, client, state.get('base_task_id'))
|
# then we do it Only after a successful remote session
|
||||||
|
delete_old_tasks_callback = partial(delete_old_tasks, state, client, state.get('base_task_id'))
|
||||||
|
else:
|
||||||
|
delete_old_tasks(state, client, state.get('base_task_id'))
|
||||||
|
|
||||||
# Clone the Task and adjust parameters
|
# Clone the Task and adjust parameters
|
||||||
task = clone_task(state)
|
task = clone_task(state)
|
||||||
|
Loading…
Reference in New Issue
Block a user