Fix shutdown hook in worker mode (#8098)

This commit is contained in:
Kai Yang authored and GitHub committed 2020-05-26 15:23:44 +08:00
1 parent f39760a4d3
commit 26cffb9c7c
1 file changed
+7 -5
@@ -102,12 +102,14 @@ public final class RayNativeRuntime extends AbstractRayRuntime {
@Override
public void shutdown() {
nativeShutdown();
if (null != manager) {
manager.cleanup();
manager = null;
if (rayConfig.workerMode == WorkerType.DRIVER) {
nativeShutdown();
if (null != manager) {
manager.cleanup();
manager = null;
}
RayConfig.reset();
}
RayConfig.reset();
LOGGER.info("RayNativeRuntime shutdown");
}