From 7aa386f027496c47f03d8920ed8f6a38fcefed64 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 19 Mar 2007 00:58:38 +0000 Subject: [PATCH] =?utf8?q?Bugfix:=20No=20finalizar=20instancias=20de=20ent?= =?utf8?q?rega=20que=20todav=C3=ADa=20se=20est=C3=A1n=20procesando.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- start-sercom.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/start-sercom.py b/start-sercom.py index 6a3235b..6f839cd 100644 --- a/start-sercom.py +++ b/start-sercom.py @@ -46,6 +46,13 @@ class Queue(object): #{{{ InstanciaDeEntrega.q.inicio_proceso == None, InstanciaDeEntrega.q.fin <= datetime.now())) instancia = select.orderBy(InstanciaDeEntrega.q.fin)[0] + n = Entrega.selectBy(instancia=instancia, fin=None).count() + if n: + log.debug(_(u'Esperando para procesar instancia (%s), ' + 'faltan probar %s entregas'), instancia.shortrepr(), + n) + time.sleep(30) + continue instancia.inicio_proceso = datetime.now() finally: hub.commit() -- 2.43.0