Athena: increase timeouts (#21316)

* fix typo in thread name

* bump send/upload timeout to 30 seconds
local_plotjuggler
Willem Melching 2021-06-17 19:20:41 +02:00 committed by GitHub
parent ba15fb4803
commit fc569694e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -54,7 +54,7 @@ def handle_long_poll(ws):
threads = [
threading.Thread(target=ws_recv, args=(ws, end_event), name='ws_recv'),
threading.Thread(target=ws_send, args=(ws, end_event), name='wc_send'),
threading.Thread(target=ws_send, args=(ws, end_event), name='ws_send'),
threading.Thread(target=upload_handler, args=(end_event,), name='upload_handler'),
threading.Thread(target=log_handler, args=(end_event,), name='log_handler'),
] + [
@ -116,7 +116,7 @@ def _do_upload(upload_item):
return requests.put(upload_item.url,
data=f,
headers={**upload_item.headers, 'Content-Length': str(size)},
timeout=10)
timeout=30)
# security: user should be able to request any message from their car
@ -479,8 +479,7 @@ def main():
ws = create_connection(ws_uri,
cookie="jwt=" + api.get_token(),
enable_multithread=True,
timeout=1.0)
ws.settimeout(1)
timeout=30.0)
cloudlog.event("athenad.main.connected_ws", ws_uri=ws_uri)
manage_tokens(api)