#856: BibSched: tasks not halting the queue on failure
------------------------+-----------------------
Reporter: jlavik | Owner:
Type: enhancement | Status: assigned
Priority: critical | Component: BibSched
Version: | Resolution:
Keywords: |
------------------------+-----------------------
Comment (by simko):
Replying to [comment:7 adeiana]:
> However I see it as complementary, this is what I would like:
> bibindex could throw a CERROR on utf-8 problems but an unexpected error
would stop the queue
> refextract should work the other way around where if it detects a
database error it should throw an ERROR but throw a CERROR on an
unexpected error
It may be the task itself who would catch expected and/or unexpected
errors and raise proper error up to bibsched accordingly. E.g. to exit
bibindex, we currently use:
{{{
task_update_status("ERROR")
self.put_into_db()
sys.exit(1)
}}}
while we could rather switch to using `task_update_status("CERROR")` there
everywhere.
In order to catch "unexpected" errors differently by different tasks, it
could be the task itself that would have an all-encompassing try/except
around its `run()` function, so it would raise either global ERROR or
global CERROR in its except clause, or something similar. Although it
would be better to specify each "unexpected" exception explicitly, of
course.
(In any case, we should not need to introduce any per-task specific
CFG_BIBSCHED_CONTINUABLE_TASKS, once we rely on two different ERROR/CERROR
types, I think.)
--
Ticket URL: <http://invenio-software.org/ticket/856#comment:8>
Invenio <http://invenio-software.org>