Skip to content

Commit 7607e33

Browse files
committed
perf: RCON检测15秒调整到60秒内
1 parent cee254a commit 7607e33

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: task_scheduler.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -86,18 +86,18 @@ def start_program(self):
8686
if self.is_first_run: # 只有在首次运行时才检查RCON连接
8787
INFO.logger.info("[ RCON ] 已开启RCON功能")
8888
print("[ RCON ] 已开启RCON功能")
89-
INFO.logger.info("[ RCON ] 正在检查RCON连接,请等待最多15秒......")
90-
print("[ RCON ] 正在检查RCON连接,请等待最多15秒......")
89+
INFO.logger.info("[ RCON ] 正在检查RCON连接,请等待最多60秒......")
90+
print("[ RCON ] 正在检查RCON连接,请等待最多60秒......")
9191

9292
start_time = time.time()
93-
while time.time() - start_time < 15:
93+
while time.time() - start_time < 60:
9494
if self.check_rcon():
9595
break
9696
time.sleep(1) # 每次尝试后,暂停1秒
9797

9898
else:
99-
INFO.logger.error("[ RCON ] 无法在15秒内建立RCON连接")
100-
print("[ RCON ] 无法在15秒内建立RCON连接")
99+
INFO.logger.error("[ RCON ] 无法在60秒内建立RCON连接")
100+
print("[ RCON ] 无法在60秒内建立RCON连接")
101101
exit(0)
102102

103103
self.is_first_run = False

0 commit comments

Comments
 (0)