From f5bc6e429cc84400fb20ef50f77199d7746e41b4 Mon Sep 17 00:00:00 2001 From: urlbot Date: Sun, 19 Jul 2015 02:09:56 +0200 Subject: [PATCH] make dsa watcher interval configurable --- local_config.py.skel | 3 ++- plugins.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/local_config.py.skel b/local_config.py.skel index 509b52a..6b74994 100644 --- a/local_config.py.skel +++ b/local_config.py.skel @@ -50,7 +50,8 @@ config = { 'tea_steep_time': (3*60 + 40), - 'image_preview': True + 'image_preview': True, + 'dsa_watcher_interval': 15 * 60 } def conf(val): diff --git a/plugins.py b/plugins.py index a03cde4..9992c0b 100644 --- a/plugins.py +++ b/plugins.py @@ -926,7 +926,7 @@ def command_dsa_watcher(argv, **args): else: log.plugin('unknown status %d' % status) - crawl_at = time.time() + 15*60 + crawl_at = time.time() + conf('dsa_watcher_interval') register_event(crawl_at, command_dsa_watcher, (['dsa-watcher', 'crawl'])) msg = 'dsa_watcher: next crawl set to %s' % time.strftime('%F.%T', time.localtime(crawl_at))