feature(worker): catch errors from runProcessLoop and shutdown
This commit is contained in:
parent
9e102af3dd
commit
d2f95cb5ed
1 changed files with 8 additions and 5 deletions
|
|
@ -489,12 +489,15 @@ public class Worker implements Runnable {
|
|||
shutdown();
|
||||
}
|
||||
|
||||
while (!shouldShutdown()) {
|
||||
runProcessLoop();
|
||||
try {
|
||||
while (!shouldShutdown()) {
|
||||
runProcessLoop();
|
||||
}
|
||||
}
|
||||
finally {
|
||||
finalShutdown();
|
||||
LOG.info("Worker loop is complete. Exiting from worker.");
|
||||
}
|
||||
|
||||
finalShutdown();
|
||||
LOG.info("Worker loop is complete. Exiting from worker.");
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
|
|
|
|||
Loading…
Reference in a new issue