make dsa watcher interval configurable

This commit is contained in:
urlbot
2015-07-19 02:11:32 +02:00
parent 0cb198754f
commit f5bc6e429c
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -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):
+1 -1
View File
@@ -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))