lucasheld / uptime-kuma-api

A Python wrapper for the Uptime Kuma Socket.IO API
https://uptime-kuma-api.readthedocs.io
MIT License
270 stars 20 forks source link

need to modify the value of interval and retryInterval to make it lower than 20 #47

Closed bogeit closed 1 year ago

bogeit commented 1 year ago

Sometimes I need to modify the value of interval and retryInterval to make it lower than 20. I have modified the uptime-kuma related code files and repackaged the docker image, but there is a limit on the api here. I don’t know if this limit can No looser, in order to meet this modification requirements https://github.com/lucasheld/uptime-kuma-api/blob/master/uptime_kuma_api/api.py#L287

api.edit_monitor(1, interval=5) Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.10/dist-packages/uptime_kuma_api/api.py", line 1332, in edit_monitor return self._call('editMonitor', data) File "/usr/local/lib/python3.10/dist-packages/uptime_kuma_api/api.py", line 506, in _call raise UptimeKumaException(r. get("msg")) uptime_kuma_api.exceptions.UptimeKumaException: Interval cannot be less than 20 seconds

lucasheld commented 1 year ago

I think then you also have to adjust the code of this python module. The condition prevents sending invalid values to uptime Kuma.

bogeit commented 1 year ago

I think then you also have to adjust the code of this python module. The condition prevents sending invalid values to uptime Kuma.

ok, I know, thanks.