mirror of
https://github.com/wassname/ray.git
synced 2026-07-01 04:50:40 +08:00
Change os.uname()[1] and socket.gethostname() to the portable and faster platform.node_ip() (#8839)
Co-authored-by: Mehrdad <noreply@github.com>
This commit is contained in:
@@ -4,8 +4,8 @@ import glob
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import platform
|
||||
import shutil
|
||||
import socket
|
||||
import time
|
||||
import traceback
|
||||
|
||||
@@ -302,7 +302,7 @@ if __name__ == "__main__":
|
||||
args.redis_address, password=args.redis_password)
|
||||
traceback_str = ray.utils.format_error_message(traceback.format_exc())
|
||||
message = ("The log monitor on node {} failed with the following "
|
||||
"error:\n{}".format(socket.gethostname(), traceback_str))
|
||||
"error:\n{}".format(platform.node(), traceback_str))
|
||||
ray.utils.push_error_to_driver_through_redis(
|
||||
redis_client, ray_constants.LOG_MONITOR_DIED_ERROR, message)
|
||||
raise e
|
||||
|
||||
Reference in New Issue
Block a user