Skip to content

Commit 6f26d35

Browse files
committed
Restore capabilities data in multipart
1 parent 55d671b commit 6f26d35

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

servicex_codegen/post_operation.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2727
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828
#
29+
import json
2930

3031
#
3132
# Redistribution and use in source and binary forms, with or without
@@ -84,6 +85,10 @@ def stream_generated_code(self, generated_code_result: GeneratedFileResult) -> b
8485

8586
def post(self):
8687
try:
88+
with open("transformer_capabilities.json") as capabilities_file:
89+
capabilities = json.load(capabilities_file)
90+
print("capable", capabilities['language'], capabilities['command'])
91+
8792
with TemporaryDirectory() as tempdir:
8893
body = request.get_json()
8994
generated_code_result = self.code_generator.generate_code(
@@ -98,6 +103,8 @@ def post(self):
98103
# them into a multipart mime data type
99104
m = MultipartEncoder(
100105
fields={'transformer_image': transformer_image,
106+
'language': capabilities['language'],
107+
'command': capabilities['command'],
101108
'zip_data': zip_data}
102109
)
103110

0 commit comments

Comments
 (0)