mirror of
http://aero2k.de/t/repos/urlbot-native.git
synced 2017-09-06 15:25:38 +02:00
make dsa watcher interval configurable
This commit is contained in:
@@ -50,7 +50,8 @@ config = {
|
|||||||
|
|
||||||
'tea_steep_time': (3*60 + 40),
|
'tea_steep_time': (3*60 + 40),
|
||||||
|
|
||||||
'image_preview': True
|
'image_preview': True,
|
||||||
|
'dsa_watcher_interval': 15 * 60
|
||||||
}
|
}
|
||||||
|
|
||||||
def conf(val):
|
def conf(val):
|
||||||
|
|||||||
@@ -926,7 +926,7 @@ def command_dsa_watcher(argv, **args):
|
|||||||
else:
|
else:
|
||||||
log.plugin('unknown status %d' % status)
|
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']))
|
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))
|
msg = 'dsa_watcher: next crawl set to %s' % time.strftime('%F.%T', time.localtime(crawl_at))
|
||||||
|
|||||||
Reference in New Issue
Block a user