Browse Source

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

pitchum 7 years ago
parent
commit
faf23b0eea
1 changed files with 4 additions and 0 deletions
  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