Skip to content

Commit

Permalink
Codegen invocation bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ponyisi authored and BenGalewsky committed Oct 16, 2024
1 parent 9212fe9 commit edd3ea1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 5 additions & 3 deletions servicex_app/servicex_app/code_gen_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ def __init__(self, code_gen_service_urls, transformer_manager):

@servicex_retry()
def post_request(self, post_url, post_obj):
result = requests.post(post_url + "/servicex/generated-code", json=post_obj,
timeout=REQUEST_TIMEOUT)
result = requests.post(post_url, json=post_obj, timeout=REQUEST_TIMEOUT)
return result

def generate_code_for_selection(
Expand Down Expand Up @@ -72,7 +71,10 @@ def generate_code_for_selection(
})

if result.status_code != 200:
msg = result.json()['Message']
try:
msg = result.json()['Message']
except KeyError:
msg = str(result.json())
raise ValueError(f'Failed to generate translation code: {msg}')

decoder_parts = decoder.MultipartDecoder.from_response(result)
Expand Down
1 change: 0 additions & 1 deletion servicex_app/servicex_app/reliable_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def decorator(func):
)
@wraps(func)
def wrapper(*args, **kwargs):
print(f'I am invoking {func} with args {args} and kwargs {kwargs}')
return func(*args, **kwargs)
return wrapper
return decorator

0 comments on commit edd3ea1

Please sign in to comment.