Skip to content

Commit e9883e1

Browse files
committed
os environ changes
1 parent 8aae990 commit e9883e1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

servicex_codegen/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ def create_app(test_config=None, provided_translator=None):
6161
if 'CODEGEN_CONFIG_FILE' in os.environ:
6262
app.config.from_envvar('CODEGEN_CONFIG_FILE')
6363

64+
app.config['TRANSFORMER_SCIENCE_IMAGE'] = os.environ.get('TRANSFORMER_SCIENCE_IMAGE')
65+
6466
with app.app_context():
6567
translator = provided_translator
6668

servicex_codegen/post_operation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@
3232
# modification, are permitted provided that the following conditions are met:
3333
#
3434
import os
35+
3536
import zipfile
3637
from tempfile import TemporaryDirectory
3738

38-
from flask import Response, request
39+
from flask import Response, request, current_app
3940
from flask_restful import Resource
4041
from requests_toolbelt import MultipartEncoder
4142

@@ -92,7 +93,7 @@ def post(self):
9293
zip_data = self.stream_generated_code(generated_code_result)
9394
# code gen transformer returns the default transformer image mentioned in
9495
# the config file
95-
transformer_image = os.environ.get('TRANSFORMER_SCIENCE_IMAGE')
96+
transformer_image = current_app.config.get("TRANSFORMER_SCIENCE_IMAGE")
9697

9798
# MultipartEncoder library takes multiple types of data fields and merge
9899
# them into a multipart mime data type

0 commit comments

Comments
 (0)