mirror of
https://github.com/vale981/ray
synced 2025-03-04 17:41:43 -05:00
[Raylet][Cleanup] Remove Extra Indent & Fix Typo (#28073)
* Rename `is_existing` to `is_exiting`
* Redundant `if statement`. This is covered by:
6bedaa5c87/python/ray/_raylet.pyx (L581)
This commit is contained in:
parent
a15442a510
commit
8934a8d32b
1 changed files with 13 additions and 14 deletions
|
@ -583,18 +583,17 @@ cdef execute_task(
|
|||
actor_id = core_worker.get_actor_id()
|
||||
actor = actor_class.__new__(actor_class)
|
||||
worker.actors[actor_id] = actor
|
||||
if (<int>task_type == <int>TASK_TYPE_ACTOR_CREATION_TASK):
|
||||
# Record the actor class via :actor_name: magic token in the log.
|
||||
#
|
||||
# (Phase 1): this covers code run before __init__ finishes.
|
||||
# We need to handle this separately because `__repr__` may not be
|
||||
# runnable until after `__init__` (e.g., if it accesses fields
|
||||
# defined in the constructor).
|
||||
actor_magic_token = "{}{}\n".format(
|
||||
ray_constants.LOG_PREFIX_ACTOR_NAME, actor_class.__name__)
|
||||
# Flush to both .out and .err
|
||||
print(actor_magic_token, end="")
|
||||
print(actor_magic_token, file=sys.stderr, end="")
|
||||
# Record the actor class via :actor_name: magic token in the log.
|
||||
#
|
||||
# (Phase 1): this covers code run before __init__ finishes.
|
||||
# We need to handle this separately because `__repr__` may not be
|
||||
# runnable until after `__init__` (e.g., if it accesses fields
|
||||
# defined in the constructor).
|
||||
actor_magic_token = "{}{}\n".format(
|
||||
ray_constants.LOG_PREFIX_ACTOR_NAME, actor_class.__name__)
|
||||
# Flush to both .out and .err
|
||||
print(actor_magic_token, end="")
|
||||
print(actor_magic_token, file=sys.stderr, end="")
|
||||
|
||||
# Initial eventloops for asyncio for this actor.
|
||||
if core_worker.current_actor_is_asyncio():
|
||||
|
@ -702,8 +701,8 @@ cdef execute_task(
|
|||
with core_worker.profile_event(b"task:execute"):
|
||||
task_exception = True
|
||||
try:
|
||||
is_existing = core_worker.is_exiting()
|
||||
if is_existing:
|
||||
is_exiting = core_worker.is_exiting()
|
||||
if is_exiting:
|
||||
title = f"{title}::Exiting"
|
||||
next_title = f"{next_title}::Exiting"
|
||||
with ray._private.worker._changeproctitle(title, next_title):
|
||||
|
|
Loading…
Add table
Reference in a new issue