sensein / etelemetry-client

Etelemetry client
Other
3 stars 9 forks source link

server is down again and clients gain seconds to run time without any hint on that #43

Open yarikoptic opened 1 year ago

yarikoptic commented 1 year ago

noted that dandi client is too slow, thought that it would be some added recent imports. nope:

❯ dandi -l 1 validate
2022-12-14 16:32:28,296 [   DEBUG] Starting new HTTPS connection (1): rig.mit.edu:443
2022-12-14 16:32:33,305 [   DEBUG] Could not check dandi/dandi-cli for version updates: Connection to server could not be made

so it took 5 seconds to silently timeout while checking for updates. I feel like we should add such checks to happen out of band - e.g. that function to start a thread which would be joined/waited at the end of the process (atexit) or smth like that.

mgxd commented 1 year ago

It can definitely be optimized, but as a low hanging fruit we could change https://github.com/sensein/etelemetry-client/blob/546f6ad780c09de0e3258b07085c223883bdb6ac/etelemetry/client.py#L27

to use separate timeouts for connect/read, perhaps something like (0.5, 5)