Open dale-wahl opened 3 years ago
In [middleman-python](), I changed our base exception class from
class MiddlemanException(BaseException):
pass
to
class MiddlemanException(Exception):
pass
and a CorpusException error was caught.
2021-11-03 12:00:55,960 [ERROR] Worker crawler raised exception CorpusException and will abort: Could not create corpus ic-2-356269: {'message': 'There already is a corpus named "ic-2-356269".', 'code': 'fail'} at worker.py:57->crawl.py:46->network.py:216->corpus.py:656
But it has always been BaseException
so there must be another reason. At some point I switched self.log.error()
to self.log.exception()
in the Exception block after self.run()
from the dmi-scheduler worker and then back again. Perhaps that was the culprit. I switched back to BaseException
to test that, but it failed to catch the error again (while using self.log.error()
per normal).
This seems fixed, but I do not know why it started to begin with.
Theory: custom exceptions not being caught properly in the program itself? If that's the case, then is it a
dmi-scheduler issue
? The real problem is that any sort of logging is not handled and the job is not properly closed out by thedmi-scheduler
.Possible solution: at the very least we could ensure that our base logger also handles the
root
log so that logs are not just send tostderr
/stdout
and stored in the log file. This would not resolve the error handling/job closure.Two examples where exceptions are being raised to
_bootstrap_inner
inthreading.py
.or