2 # vim: set et sw=4 sts=4 encoding=utf-8 foldmethod=marker :
6 configfile = sys.argv[1]
12 import turbogears.database
13 turbogears.update_config(configfile=configfile, modulename="sercom.config")
14 import turbogears.i18n
15 __builtins__._ = turbogears.i18n.plain_gettext # Nada de gettext lazy
18 from sercom.tester import Tester
19 from sercom.model import Entrega, hub
20 from os.path import join
21 from datetime import datetime
25 log = logging.getLogger('sercom.tester')
35 e = Entrega.selectBy(inicio=None).orderBy(Entrega.q.fecha)[0]
36 e.inicio = datetime.now()
41 log.debug(_(u'No hay entregas pendientes'))
42 time.sleep(10) # TODO config?
44 if isinstance(e, SystemExit):
46 log.exception('Queue: ')
47 time.sleep(10) # TODO config?
52 tester = Tester(name='pepe', path='var', home=join('home', 'sercom'), queue=q)