Fixed sending wrong format
This commit is contained in:
parent
aa078febc5
commit
8fa5114be1
@ -40,9 +40,21 @@ def worker_watchdog(outqueue, id):
|
||||
while True:
|
||||
try:
|
||||
worker(outqueue, id)
|
||||
except KeyboardInterrupt:
|
||||
break
|
||||
except:
|
||||
print(f"Worker {id} died! Restarting...")
|
||||
|
||||
print(f"Worker {id} exited!")
|
||||
|
||||
|
||||
def denumpy_result(numpy_type) -> list:
|
||||
denumyed = []
|
||||
for i in numpy_type:
|
||||
denumyed = int(i)
|
||||
|
||||
return denumyed
|
||||
|
||||
|
||||
def main():
|
||||
target_url = os.environ['TARGET_URL']
|
||||
@ -66,7 +78,7 @@ def main():
|
||||
local_best = result_score
|
||||
|
||||
try:
|
||||
r = requests.post(target_url, json=result)
|
||||
r = requests.post(target_url, json=denumpy_result(result))
|
||||
r.raise_for_status()
|
||||
except (ConnectionError, requests.HTTPError) as e:
|
||||
print(f"Error while posting result: {e}")
|
||||
|
Loading…
Reference in New Issue
Block a user