rgfewfger

This commit is contained in:
27942
2025-12-12 11:07:15 +08:00
parent c38679eb32
commit 61e5a897fc
2 changed files with 12 additions and 1 deletions

View File

@@ -319,6 +319,7 @@ class WeexTransaction:
self.pbar = tqdm(total=30, desc="等待时间中", ncols=80) # desc进度条说明ncols长度
self.time_start = None # 时间状态 避免同一个时段,发生太多消息
while True:
# 获取当前时间
current_time = time.localtime()
@@ -350,6 +351,11 @@ class WeexTransaction:
if self.get_now_time() != self.kline_3["id"]:
continue
if self.time_start == self.get_now_time():
continue
self.time_start = self.get_now_time()
if self.get_token(): # 获取token
logger.info("获取token成功!!!")
else:

View File

@@ -322,6 +322,7 @@ class WeexTransaction:
self.pbar = tqdm(total=30, desc="等待时间中", ncols=80) # desc进度条说明ncols长度
self.time_start = None # 时间状态 避免同一个时段,发生太多消息
while True:
# 获取当前时间
current_time = time.localtime()
@@ -335,7 +336,7 @@ class WeexTransaction:
self.pbar.refresh()
if current_minute not in [0, 1, 2, 3, 4, 5, 30, 31, 32, 33, 34, ]: # 判断是否是 新的30分钟了
# if current_minute not in range(60): # 判断是否是 新的30分钟了
# if current_minute not in range(60): # 判断是否是 新的30分钟了
time.sleep(10)
continue
@@ -359,6 +360,10 @@ class WeexTransaction:
# 判断抓取的数据是否正确
if self.get_now_time() != self.kline_3["id"]:
continue
if self.time_start == self.get_now_time():
continue
self.time_start = self.get_now_time()
if self.get_position_status():
logger.info("获取仓位信息成功!!!")