mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 09:29:05 +08:00
Port actor creation to use direct calls (#6375)
This commit is contained in:
committed by
Eric Liang
parent
74b454c614
commit
c57dcc82d1
@@ -718,7 +718,9 @@ cdef CRayStatus task_execution_handler(
|
||||
traceback_str,
|
||||
job_id=None)
|
||||
sys.exit(1)
|
||||
except SystemExit:
|
||||
except SystemExit as e:
|
||||
if not hasattr(e, "is_ray_terminate"):
|
||||
logger.exception("SystemExit was raised from the worker")
|
||||
# Tell the core worker to exit as soon as the result objects
|
||||
# are processed.
|
||||
return CRayStatus.SystemExit()
|
||||
|
||||
+5
-2
@@ -6,7 +6,6 @@ import copy
|
||||
import inspect
|
||||
import logging
|
||||
import six
|
||||
import sys
|
||||
import weakref
|
||||
|
||||
from abc import ABCMeta, abstractmethod
|
||||
@@ -815,7 +814,11 @@ def exit_actor():
|
||||
ray.disconnect()
|
||||
# Disconnect global state from GCS.
|
||||
ray.state.state.disconnect()
|
||||
sys.exit(0)
|
||||
# Set a flag to indicate this is an intentional actor exit. This
|
||||
# reduces log verbosity.
|
||||
exit = SystemExit(0)
|
||||
exit.is_ray_terminate = True
|
||||
raise exit
|
||||
assert False, "This process should have terminated."
|
||||
else:
|
||||
raise Exception("exit_actor called on a non-actor worker.")
|
||||
|
||||
Reference in New Issue
Block a user