mirror of
https://github.com/clearml/clearml-session
synced 2025-01-31 02:46:56 +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_launch(args)
|
||||
|
||||
# remove old Tasks created by us.
|
||||
# (now we do it Only after a successful remote session)
|
||||
delete_old_tasks_callback = partial(delete_old_tasks, state, client, state.get('base_task_id'))
|
||||
# remove old Tasks created by us, unless we have to restore workspace,
|
||||
if state.get("store_workspace") or state.get("continue_session"):
|
||||
# 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
|
||||
task = clone_task(state)
|
||||
|
Loading…
Reference in New Issue
Block a user