feature(worker): catch errors from runProcessLoop and shutdown

This commit is contained in:
bencvdb 2019-06-26 13:51:50 -07:00
parent 9e102af3dd
commit d2f95cb5ed

View file

@ -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