mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
Fix core worker shutdown errors (#6004)
This commit is contained in:
parent
71a2f4c63d
commit
6f27d881bd
1 changed files with 5 additions and 6 deletions
|
@ -1669,12 +1669,11 @@ def disconnect(exiting_interpreter=False):
|
||||||
worker.function_actor_manager.reset_cache()
|
worker.function_actor_manager.reset_cache()
|
||||||
worker.serialization_context_map.clear()
|
worker.serialization_context_map.clear()
|
||||||
|
|
||||||
if not exiting_interpreter:
|
# We need to destruct the core worker here because after this function,
|
||||||
if hasattr(worker, "raylet_client"):
|
# we will tear down any processes spawned by ray.init() and the background
|
||||||
del worker.raylet_client
|
# threads in the core worker don't currently handle that gracefully.
|
||||||
|
if hasattr(worker, "core_worker"):
|
||||||
if hasattr(worker, "core_worker"):
|
del worker.core_worker
|
||||||
del worker.core_worker
|
|
||||||
|
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
|
|
Loading…
Add table
Reference in a new issue