shunping commented on code in PR #37379:
URL: https://github.com/apache/beam/pull/37379#discussion_r2737604135
##########
sdks/python/apache_beam/runners/worker/sdk_worker_main.py:
##########
@@ -93,8 +93,25 @@ def create_harness(environment, dry_run=False):
else:
fn_log_handler = None
- pipeline_options_dict = _load_pipeline_options(
- environment.get('PIPELINE_OPTIONS'))
+ options_json = environment.get('PIPELINE_OPTIONS')
+
+ #We check if options are stored in the file.
+ if 'PIPELINE_OPTIONS_FILE' in environment:
+ options_file = environment['PIPELINE_OPTIONS_FILE']
+ try:
+ with open(options_file, 'r') as f:
+ options_json = f.read()
+ _LOGGER.info('Load pipeline options from file: %s', options_file)
+ except:
+ _LOGGER.error(
+ 'Failed to load pipeline options from file: %s', options_file)
+ raise
+
+ pipeline_options_dict = _load_pipeline_options(options_json)
+
+ #pipeline_options_dict = _load_pipeline_options(
Review Comment:
Remove unnecessary comments.
--
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]