fix handler error catch

This commit is contained in:
rmanach 2023-04-22 15:32:57 +02:00
parent b82d968e49
commit 42da6f8840

View File

@ -108,12 +108,9 @@ impl<H: Handler, N: Notifier> Worker<H, N> {
// TODO: the message could be requeued if needed // TODO: the message could be requeued if needed
if let Err(e) = handler.handle(runner.run()) { if let Err(e) = handler.handle(runner.run()) {
match e { if let HandlerError::Unknown = e {
HandlerError::Unknown => { Worker::<H, N>::set_status(&status, WorkerStatus::Failed);
Worker::<H, N>::set_status(&status, WorkerStatus::Failed); break;
break;
}
_ => (),
} }
} }
// TODO: collect a message from the handler (modify the signature) // TODO: collect a message from the handler (modify the signature)