Parcourir la source

Cron task: error syncing one ISP should not break the whole process.

pitchum il y a 7 ans
Parent
commit
faf23b0eea
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      ffdnispdb/cron_task.py

+ 4 - 0
ffdnispdb/cron_task.py

@@ -163,6 +163,10 @@ try:
                                         'Having problems with your webserver ?')
                 print u'    three strikes, you\'re out'
             print traceback.format_exc()
+        except:
+            print u'Unknown error, see call stack below.'
+            traceback.print_exc() # To help debugging the cause of the failure
+            db.session.rollback()
 
 except ScriptTimeout:
     pass