shiblon/entroq

Add special error type to worker indicating "move to an error queue instead of exiting"

Closed this issue · 0 comments

There are cases where a worker should not quit because of a task error. Dependency errors are already one of these, as are timeout and cancelation errors. There are user-defined times when it is useful to, instead of returning an error that causes a worker to exit (crash), the task under consideration should be moved out of the way for later study.

Often something intrinsic about the task makes it a problem to keep around (e.g., it might keep crashing a worker if left in an inbox), but returning an error shouldn't cause all work to cease, and keeping the task around for debugging purposes is useful.

This is common enough that it should be part of the mainline.