From 14b77b60fdb2b36409a403bf8753d877f33e32b9 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sun, 20 Jul 2014 13:50:28 +0100 Subject: [PATCH 1/1] svc/connect.in: Only check the configuration database once a minute. I think this is quite often enough, and more is likely to drain the battery of mobile devices unacceptably. --- svc/connect.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svc/connect.in b/svc/connect.in index 000ca50e..8abe108a 100644 --- a/svc/connect.in +++ b/svc/connect.in @@ -127,7 +127,7 @@ class ErrorWatch (T.Coroutine): def dbwatch(): """ - Coroutine function: wake up every second and notice changes to the + Coroutine function: wake up every minute and notice changes to the database. When a change happens, tell the Pinger (q.v.) to rescan its peers. """ @@ -135,7 +135,7 @@ def dbwatch(): main = cr.parent fw = M.FWatch(opts.cdb) while True: - timer = M.SelTimer(time() + 1, lambda: cr.switch()) + timer = M.SelTimer(time() + 60, lambda: cr.switch()) main.switch() if fw.update(): pinger.rescan(False) -- 2.11.0