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