Пример #1
0
    def reraise(self):
        from ESSArch_Core.celery.backends.database import DatabaseBackend

        tb = self.create_traceback()
        exc = DatabaseBackend.exception_to_python(self.exception)

        raise exc.with_traceback(tb)
Пример #2
0
 def get_exception(self, obj):
     if obj.exception is None:
         return None
     try:
         exc = DatabaseBackend.exception_to_python(obj.exception)
     except Exception:
         return obj.exception
     return repr(exc)
Пример #3
0
 def get_exception(self, obj):
     t = self.get_failed_tasks(obj).only('exception').first()
     if t:
         if t.exception is None:
             return None
         try:
             exc = DatabaseBackend.exception_to_python(t.exception)
         except Exception:
             return obj.exception
         return repr(exc)