Skip to content

Commit 8d352f8

Browse files
committed
Minor change to termination logic
1 parent 95ee282 commit 8d352f8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sdks/python/apache_beam/runners/worker/sdk_worker_main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ def terminate_sdk_harness():
233233
if _FN_LOG_HANDLER:
234234
_FN_LOG_HANDLER.close()
235235
os.kill(os.getpid(), signal.SIGINT)
236+
# Delay further control flow in the caller until process is terminated.
237+
time.sleep(60)
238+
# Try to force-terminate if still running.
239+
os.kill(os.getpid(), signal.SIGKILL)
236240

237241

238242
def _load_pipeline_options(options_json):

0 commit comments

Comments
 (0)