From: James Andrewartha Date: Sun, 25 Oct 2009 08:08:19 +0000 (+0800) Subject: reduce update rate on error X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=4d9c37a4dd3ab8edb2cd88a4a9d261c2f5fc1f1f;p=uccdoor.git reduce update rate on error --- diff --git a/server.py b/server.py index 5814804..11fe9de 100755 --- a/server.py +++ b/server.py @@ -86,6 +86,8 @@ class Door(dbus.service.Object): self.status = newstatus # emit signal self.status_changed(newstatus) + # back off if broken + self.interval = [10,10,20][newstatus] # set up timeout again self.timeout = Timer(self.interval, self.poll)