mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
Remove log suppression code
When running in a screen (or any other time it is hard to scroll up), printing "Suppressing previous error message" is not helpful since the previous error is lost far above past scrollback. Better to just print it repeatedly at the end. tada 1
This commit is contained in:
parent
045861c9b0
commit
bee743c152
1 changed files with 2 additions and 17 deletions
|
@ -1958,21 +1958,11 @@ def print_error_messages_raylet(worker):
|
|||
worker.error_message_pubsub_client.subscribe(error_pubsub_channel)
|
||||
# worker.error_message_pubsub_client.psubscribe("*")
|
||||
|
||||
# Keep a set of all the error messages that we've seen so far in order to
|
||||
# avoid printing the same error message repeatedly. This is especially
|
||||
# important when running a script inside of a tool like screen where
|
||||
# scrolling is difficult.
|
||||
old_error_messages = set()
|
||||
|
||||
# Get the exports that occurred before the call to subscribe.
|
||||
with worker.lock:
|
||||
error_messages = global_state.error_messages(worker.task_driver_id)
|
||||
for error_message in error_messages:
|
||||
if error_message not in old_error_messages:
|
||||
logger.error(error_message)
|
||||
old_error_messages.add(error_message)
|
||||
else:
|
||||
logger.error("Suppressing duplicate error message.")
|
||||
logger.error(error_message)
|
||||
|
||||
try:
|
||||
for msg in worker.error_message_pubsub_client.listen():
|
||||
|
@ -1990,12 +1980,7 @@ def print_error_messages_raylet(worker):
|
|||
continue
|
||||
|
||||
error_message = ray.utils.decode(error_data.ErrorMessage())
|
||||
|
||||
if error_message not in old_error_messages:
|
||||
logger.error(error_message)
|
||||
old_error_messages.add(error_message)
|
||||
else:
|
||||
logger.error("Suppressing duplicate error message.")
|
||||
logger.error(error_message)
|
||||
|
||||
except redis.ConnectionError:
|
||||
# When Redis terminates the listen call will throw a ConnectionError,
|
||||
|
|
Loading…
Add table
Reference in a new issue