# HG changeset patch # User Sylvain Thénault # Date 1297099180 -3600 # Node ID e350771c23a32b2a1eeb903d4a426dd537ddd161 # Parent 28bf94d062a994d804da40e11c1b4ad935f139f1 [pyrorql source] using 'time' option type is more convenient diff -r 28bf94d062a9 -r e350771c23a3 server/sources/pyrorql.py --- a/server/sources/pyrorql.py Mon Feb 07 18:19:39 2011 +0100 +++ b/server/sources/pyrorql.py Mon Feb 07 18:19:40 2011 +0100 @@ -111,8 +111,8 @@ 'group': 'pyro-source', 'level': 2, }), ('synchronization-interval', - {'type' : 'int', - 'default': 5*60, + {'type' : 'time', + 'default': '5min', 'help': 'interval between synchronization with the external \ repository (default to 5 minutes).', 'group': 'pyro-source', 'level': 2, @@ -172,7 +172,7 @@ """method called by the repository once ready to handle request""" self.load_mapping(session) if activated: - interval = int(self.config.get('synchronization-interval', 5*60)) + interval = self.config['synchronization-interval'] self.repo.looping_task(interval, self.synchronize) self.repo.looping_task(self._query_cache.ttl.seconds/10, self._query_cache.clear_expired)