From 8c4b134f76ff254975ccf95ace89ce80d023a549 Mon Sep 17 00:00:00 2001 From: Rahul Desai Date: Fri, 11 Oct 2024 15:57:28 -0700 Subject: [PATCH] add graceful termination to nextflow runtime task --- latch/resources/tasks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/latch/resources/tasks.py b/latch/resources/tasks.py index 650574f3..e816df50 100644 --- a/latch/resources/tasks.py +++ b/latch/resources/tasks.py @@ -606,6 +606,8 @@ def nextflow_runtime_task(cpu: int, memory: int, storage_gib: int = 50): task_config = _custom_task_config(cpu, memory, storage_gib) task_config.pod_spec.automount_service_account_token = True + # rahul: give flyte enough time to process the task after completion + task_config.pod_spec.termination_grace_period_seconds = 120 assert len(task_config.pod_spec.containers) == 1 task_config.pod_spec.containers[0].volume_mounts = [