Closed lucasheld closed 1 year ago
This is a very good point - I was just here to create a PR for that (but as you are on that issue too, I won't for now)! A very simple solution would be to set the timeout
parameter of https://github.com/lucasheld/uptime-kuma-api/blob/a576ed9f3a96c6e4d240a352c210c4c78ac48c7f/uptime_kuma_api/api.py#L484 ! Because the timeouts of ~60 seconds are horrible for fast api interactions...
For myself I already drastically sped up the error handling with...
r = self.sio.call(event, data, timeout=self.wait_timeout)
...which also forced me to implement retry-mechanisms in my own code (which is a good practice anyway).
@simonmicro I have created a pull request: #34. What do you think?
It's included in release 1.0.1
In some cases, certain events never arrive. This can happen, for example, if you call the cert_info method without having a monitor that uses TLS. It is difficult to address all these special cases individually. Especially without documentation when this happens. Instead, timeouts for all methods would be useful, also for other errors. In order not to block the application forever.