Skip to content
Snippets Groups Projects
Commit fbd87ff9 authored by Panos Christeas's avatar Panos Christeas
Browse files

Ir.cron: when an exception occurs, log it.

bzr revid: p_christ@hol.gr-20090613143734-crws6uecjnmxpjsy
parent 9c584b3f
No related branches found
No related tags found
No related merge requests found
......@@ -107,8 +107,10 @@ class ir_cron(osv.osv, netsvc.Agent):
addsql = ', active=False'
cr.execute("update ir_cron set nextcall=%s, numbercall=%s"+addsql+" where id=%s", (nextcall.strftime('%Y-%m-%d %H:%M:%S'), numbercall, job['id']))
cr.commit()
except:
print "Exception in cron!"
except Exception,ex:
logger=netsvc.Logger()
logger.notifyChannel('cron', netsvc.LOG_WARNING,
'Exception in cron:'+str(ex))
finally:
cr.commit()
cr.close()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment