tvalentyn commented on code in PR #35391:
URL: https://github.com/apache/beam/pull/35391#discussion_r2304004031
##########
sdks/python/apache_beam/runners/worker/sdk_worker_main.py:
##########
@@ -219,6 +224,14 @@ def main(unused_argv):
fn_log_handler.close()
+def flush_fn_log_handler():
+ """Flushes the FnApiLogRecordHandler if it exists."""
+ _LOGGER.error('The Sdk harness will be terminated now.')
+ if _FN_LOG_HANDLER:
+ _FN_LOG_HANDLER.close()
+ os._exit(1)
Review Comment:
This a fair concern. Could we try `os.kill(os.getpid(), signal.SIGINT)` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]