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,13 +489,16 @@ public class Worker implements Runnable {
|
||||||
shutdown();
|
shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
while (!shouldShutdown()) {
|
while (!shouldShutdown()) {
|
||||||
runProcessLoop();
|
runProcessLoop();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
finally {
|
||||||
finalShutdown();
|
finalShutdown();
|
||||||
LOG.info("Worker loop is complete. Exiting from worker.");
|
LOG.info("Worker loop is complete. Exiting from worker.");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
void runProcessLoop() {
|
void runProcessLoop() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue