Skip to content

Commit

Permalink
- Make the application of the -s option automatic if running in AWS …
Browse files Browse the repository at this point in the history
…lambda.
  • Loading branch information
Michaellh0079 committed Apr 18, 2024
1 parent 206f83c commit 661a86b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dmrpp_generator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,8 @@ def get_dmrpp_command(self, dmrpp_meta, input_path, output_filename, local=False
options = dmrpp_options.get_dmrpp_option(dmrpp_meta=dmrpp_meta)
local_option = f"-u file://{output_filename}" if '-u' in options else ''

use_lambda = dmrpp_meta.get('use_lambda', False)
s_option = ''
if isinstance(use_lambda, bool) and use_lambda:
if os.getenv('AWS_LAMBDA_FUNCTION_NAME'):
s_option = '-s /etc/bes/site.conf'

dmrpp_cmd = f"get_dmrpp {s_option} {options} {input_path} -o {output_filename}.dmrpp" \
Expand Down

0 comments on commit 661a86b

Please sign in to comment.