save code
This commit is contained in:
@@ -305,9 +305,9 @@ def main_worker():
|
||||
time.sleep(0.1)
|
||||
|
||||
serverindex = 0
|
||||
def regServer(instance):
|
||||
def regServer(instance, ip):
|
||||
global serverindex
|
||||
registerGpuServer(f"s{serverindex}_1_{instance}", f"http://localhost:8888", True)
|
||||
registerGpuServer(f"s{serverindex}_1_{instance}", f"http://{ip}:8888", True)
|
||||
serverindex += 1
|
||||
|
||||
|
||||
@@ -316,6 +316,7 @@ if __name__ == '__main__':
|
||||
print(f"[Worker] Starting with PID: {os.getpid()}")
|
||||
redis_conn.set(GPU_SERVER_LIST, "[]")
|
||||
|
||||
regServer("localhost")
|
||||
regServer("一号", "192.168.101.118")
|
||||
regServer("二号", "192.168.101.221")
|
||||
|
||||
main_worker()
|
||||
Reference in New Issue
Block a user