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:
mehrdadn
2020-06-08 21:29:46 -07:00
committed by GitHub
parent d2ef29f0d2
commit f93bb008bb
15 changed files with 31 additions and 27 deletions
+2 -2
View File
@@ -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