diff --git a/servicex_codegen/__init__.py b/servicex_codegen/__init__.py index 7705dd8..083859c 100644 --- a/servicex_codegen/__init__.py +++ b/servicex_codegen/__init__.py @@ -57,8 +57,11 @@ def create_app(test_config=None, provided_translator=None): if test_config: app.config.from_mapping(test_config) - elif 'APP_CONFIG_FILE' in os.environ: - app.config.from_envvar('APP_CONFIG_FILE') + else: + if 'APP_CONFIG_FILE' in os.environ: + app.config.from_envvar('APP_CONFIG_FILE') + if 'CODEGEN_CONFIG_FILE' in os.environ: + app.config.from_envvar('CODEGEN_CONFIG_FILE') with app.app_context(): translator = provided_translator diff --git a/servicex_codegen/post_operation.py b/servicex_codegen/post_operation.py index 06d5878..bdcc2f7 100644 --- a/servicex_codegen/post_operation.py +++ b/servicex_codegen/post_operation.py @@ -90,11 +90,12 @@ def post(self): body["code"], cache_path=tempdir) zip_data = self.stream_generated_code(generated_code_result) - # code gen transformer returns the default transformer image mentioned in the config file + # code gen transformer returns the default transformer image mentioned in + # the config file transformer_image = current_app.config.get("TRANSFORMER_SCIENCE_IMAGE") - # Send the response back to you-know-what. - # MultipartEncoder library takes multiple types of data fields and merge them into a multipart mime data type + # MultipartEncoder library takes multiple types of data fields and merge + # them into a multipart mime data type m = MultipartEncoder( fields={'transformer_image': transformer_image, 'zip_data': zip_data}