Skip to content

Commit 8fa4fd9

Browse files
committed
Introduced flag for keeping VMs alive
1 parent 0f3de68 commit 8fa4fd9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

alts/worker/tasks.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ def set_artifacts_when_stage_has_unexpected_exception(
174174
module_name = task_params.get('module_name')
175175
module_stream = task_params.get('module_stream')
176176
module_version = task_params.get('module_version')
177+
vm_alive = task_params.get('vm_alive')
177178
try:
178179
# Wait a bit to not spawn all environments at once when
179180
# a lot of tasks are coming to the machine
@@ -236,7 +237,8 @@ def set_artifacts_when_stage_has_unexpected_exception(
236237
section_name='Unexpected errors during tests',
237238
)
238239
finally:
239-
runner.teardown()
240+
if not vm_alive:
241+
runner.teardown()
240242
summary = defaultdict(dict)
241243
if aborted:
242244
summary['revoked'] = True

0 commit comments

Comments
 (0)