save code

This commit is contained in:
colomi
2025-07-28 20:50:16 +08:00
parent cfbd7a579b
commit e051ccb35f
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -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()