xtn-tools-pro 1.0.1.0.9__py3-none-any.whl → 1.0.1.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -187,11 +187,20 @@ class GoFunTaskV3:
187
187
  params = {"taskType": task}
188
188
  logger.warning("下载队列启动成功...")
189
189
  download_queue_exist_cnt = 3
190
+ now_qsize_v = None
191
+ now_qsize_v_time = None
190
192
  while True:
191
193
  try:
192
194
  qsize = download_queue.qsize()
193
195
  logger.info(f"当前队列剩余任务数:{qsize}")
194
196
  if qsize > download_task_qsize:
197
+ if not now_qsize_v or qsize != now_qsize_v:
198
+ now_qsize_v = qsize
199
+ now_qsize_v_time = get_time_now_timestamp(is_time_10=True)
200
+
201
+ if now_qsize_v_time + (60 * 5) < get_time_now_timestamp(is_time_10=True):
202
+ manager_info["gofun_kill_status"] = True
203
+
195
204
  time.sleep(download_not_task_time)
196
205
  continue
197
206
  resp = requests.get(download_url, headers=headers, params=params, timeout=5)
@@ -36,7 +36,7 @@ class ShellPro:
36
36
  self.server_info_list[_]["conn"] = conn
37
37
  self.__logger.info(f"{tips} 连接成功!!!")
38
38
 
39
- def run_shell(self, conn, cmd, warn=False, hide=True,tips=""):
39
+ def run_shell(self, conn, cmd, warn=False, hide=True, tips=""):
40
40
  """
41
41
  传入conn和命令执行
42
42
  :param conn:
@@ -46,7 +46,8 @@ class ShellPro:
46
46
  :param tips: 备注信息
47
47
  :return:
48
48
  """
49
- conn.run(cmd, warn=warn, hide=True)
49
+ conn.run(cmd, warn=warn, hide=hide)
50
+ self.__logger.info(f"{tips} {cmd}")
50
51
 
51
52
  def update_file(self, local_file, remote_file, mkdir=False):
52
53
  """
@@ -63,7 +64,7 @@ class ShellPro:
63
64
  if mkdir:
64
65
  remote_dir = os.path.dirname(remote_file)
65
66
  cmd = f"mkdir -p {remote_dir}"
66
- self.run_shell(conn, cmd=cmd, warn=True,tips=tips)
67
+ self.run_shell(conn, cmd=cmd, warn=True, tips=tips)
67
68
  conn.put(local_file, remote_file)
68
69
  self.__logger.info(f"{tips}-{ip} 覆盖远程文件成功!!!")
69
70
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xtn-tools-pro
3
- Version: 1.0.1.0.9
3
+ Version: 1.0.1.1.1
4
4
  Summary: xtn 开发工具
5
5
  Author: xtn
6
6
  Author-email: czw011122@gmail.com
@@ -51,7 +51,7 @@ xtn_tools_pro/task_pro/__init__.py,sha256=nK3U47hWwE1H875ieEToH9r-jzXHS-PXk8cDst
51
51
  xtn_tools_pro/task_pro/go_fun.py,sha256=hWEt2uJ9FCvJH7PhVZttS-11A7J6zbRKwX7c5YLYQag,19144
52
52
  xtn_tools_pro/task_pro/go_fun_air_v1.py,sha256=25gHmW5aAV6nMY9Y6-wD7uQ_wqE39dr-eaegqVbYKM8,11035
53
53
  xtn_tools_pro/task_pro/go_fun_v2.py,sha256=SgcXgtEBGSVL1V2LyqO0z8Md2H8JZxucYrLLIwqtiLM,18489
54
- xtn_tools_pro/task_pro/go_fun_v3.py,sha256=GnwowamPTsuL-oSaXYqIkp-DBxFKV5-T1l0A6VZ_6kk,18801
54
+ xtn_tools_pro/task_pro/go_fun_v3.py,sha256=Dz-W-yXnzYlmCmZSnGr9nFI_A1feA-kU7i5g4tgtUYw,19221
55
55
  xtn_tools_pro/utils/__init__.py,sha256=I1_n_NP23F2lBqlF4EOlnOdLYxM8M4pbn63UhJN1hRE,418
56
56
  xtn_tools_pro/utils/crypto.py,sha256=YOdWB8yVauVEyT2d5i9M_bXUJVFTq4BQoUy2NLPhmts,4427
57
57
  xtn_tools_pro/utils/file_utils.py,sha256=obaBP7CaBCsXxzqGeWzV2l0yw7vicgKOaXzmpMV8ips,2567
@@ -59,12 +59,12 @@ xtn_tools_pro/utils/helpers.py,sha256=OmPRxB6vDN1S7OhxQWgoOXnxs2YPorwSQKBVzYOiKo
59
59
  xtn_tools_pro/utils/log.py,sha256=mf5huJDA8xVxxFWPG_tl_vOsAA2_ywGDFycYSGHIDCo,10202
60
60
  xtn_tools_pro/utils/retry.py,sha256=0wjHsR5DBBKpv4naMfxiky8kprrZes4WURIfFQ4H708,1657
61
61
  xtn_tools_pro/utils/set_data.py,sha256=BzCLbEDO83csDHBey8kP7SoE6kx6EjqE7OqRBY7k82s,17608
62
- xtn_tools_pro/utils/shell.py,sha256=pWOL0hrpqSqwoyJP-A0PcQiD9H1rlQ_ppD63YqvwqWE,2893
62
+ xtn_tools_pro/utils/shell.py,sha256=2SeC620Fj2Gi4bSWmr6w9-OjOBR1MB_OfTEz5HIwK-k,2940
63
63
  xtn_tools_pro/utils/sql.py,sha256=EAKzbkZP7Q09j15Gm6o0_uq0qgQmcCQT6EAawbpp4v0,6263
64
64
  xtn_tools_pro/utils/time_utils.py,sha256=TUtzG61PeVYXhaQd6pBrXAdlz7tBispNIRQRcGhE2No,4859
65
- xtn_tools_pro-1.0.1.0.9.dist-info/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
- xtn_tools_pro-1.0.1.0.9.dist-info/METADATA,sha256=8MPSg9LUGunHt5Uw7Nw_nndkfjhEd2_zrjWgW2JD6Mc,523
67
- xtn_tools_pro-1.0.1.0.9.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
68
- xtn_tools_pro-1.0.1.0.9.dist-info/entry_points.txt,sha256=t8CtXWOgw7nRDW3XNlZh8MT_P4l8EzsFnyWi5b3ovrc,68
69
- xtn_tools_pro-1.0.1.0.9.dist-info/top_level.txt,sha256=jyB3FLDEr8zE1U7wHczTgIbvUpALhR-ULF7RVEO7O2U,14
70
- xtn_tools_pro-1.0.1.0.9.dist-info/RECORD,,
65
+ xtn_tools_pro-1.0.1.1.1.dist-info/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
+ xtn_tools_pro-1.0.1.1.1.dist-info/METADATA,sha256=3m-lB-hknFpwoaitoSXl0J5gumH6vkkvDNOOIk5wWoA,523
67
+ xtn_tools_pro-1.0.1.1.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
68
+ xtn_tools_pro-1.0.1.1.1.dist-info/entry_points.txt,sha256=t8CtXWOgw7nRDW3XNlZh8MT_P4l8EzsFnyWi5b3ovrc,68
69
+ xtn_tools_pro-1.0.1.1.1.dist-info/top_level.txt,sha256=jyB3FLDEr8zE1U7wHczTgIbvUpALhR-ULF7RVEO7O2U,14
70
+ xtn_tools_pro-1.0.1.1.1.dist-info/RECORD,,