xtn-tools-pro 1.0.0.5.8__tar.gz → 1.0.0.6.0__tar.gz

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.
Files changed (30) hide show
  1. {xtn-tools-pro-1.0.0.5.8/xtn_tools_pro.egg-info → xtn-tools-pro-1.0.0.6.0}/PKG-INFO +1 -1
  2. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/setup.py +1 -1
  3. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro/task_pro/go_fun_v2.py +34 -1
  4. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0/xtn_tools_pro.egg-info}/PKG-INFO +1 -1
  5. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/LICENSE +0 -0
  6. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/README.md +0 -0
  7. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/setup.cfg +0 -0
  8. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro/__init__.py +0 -0
  9. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro/db/MongoDB.py +0 -0
  10. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro/db/MysqlDB.py +0 -0
  11. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro/db/RedisDB.py +0 -0
  12. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro/db/__init__.py +0 -0
  13. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro/proxy/XiaoXiangProxy.py +0 -0
  14. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro/proxy/__init__.py +0 -0
  15. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro/proxy/proxy.py +0 -0
  16. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro/task_pro/__init__.py +0 -0
  17. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro/task_pro/go_fun.py +0 -0
  18. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro/tools.py +0 -0
  19. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro/utils/__init__.py +0 -0
  20. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro/utils/crypto.py +0 -0
  21. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro/utils/file_utils.py +0 -0
  22. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro/utils/helpers.py +0 -0
  23. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro/utils/log.py +0 -0
  24. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro/utils/retry.py +0 -0
  25. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro/utils/sql.py +0 -0
  26. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro/utils/time_utils.py +0 -0
  27. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro.egg-info/SOURCES.txt +0 -0
  28. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro.egg-info/dependency_links.txt +0 -0
  29. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro.egg-info/requires.txt +0 -0
  30. {xtn-tools-pro-1.0.0.5.8 → xtn-tools-pro-1.0.0.6.0}/xtn_tools_pro.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xtn-tools-pro
3
- Version: 1.0.0.5.8
3
+ Version: 1.0.0.6.0
4
4
  Summary: xtn 开发工具
5
5
  Author: xtn
6
6
  Author-email: czw011122@gmail.com
@@ -15,7 +15,7 @@ with open("README.md", "r") as f:
15
15
 
16
16
  setuptools.setup(
17
17
  name="xtn-tools-pro", # 模块名称
18
- version="1.0.0.5.8", # 版本
18
+ version="1.0.0.6.0", # 版本
19
19
  author="xtn", # 作者
20
20
  author_email="czw011122@gmail.com", # 作者邮箱
21
21
  description="xtn 开发工具", # 模块简介
@@ -133,7 +133,7 @@ class GoFunTaskV2:
133
133
  go_task_fun_task_process.start()
134
134
 
135
135
  while True:
136
- logger.info("进程正常...")
136
+ logger.debug("进程正常...")
137
137
  time.sleep(10)
138
138
 
139
139
  def _download_and_upload_task(self, ini_info, logger, download_queue, upload_queue, proxies_dict):
@@ -323,6 +323,7 @@ class GoFunTaskV2:
323
323
  go_task_function))
324
324
  processes_start_list.append(p)
325
325
  p.start()
326
+ time.sleep(1)
326
327
 
327
328
  if not restart_time:
328
329
  # 一直执行 不退出
@@ -353,3 +354,35 @@ class GoFunTaskV2:
353
354
  # 等待所有线程完成
354
355
  for future in concurrent.futures.as_completed(futures):
355
356
  future.result()
357
+
358
+ def get_download_task(self, download_queue, block, timeout):
359
+ """
360
+ 获取下载任务
361
+ :param download_queue:下载队列
362
+ :param block: 是否阻塞等待 True阻塞/False不阻塞
363
+ :param timeout:
364
+ :return:
365
+ """
366
+ try:
367
+ task_item = download_queue.get(block=block, timeout=timeout)
368
+ return task_item
369
+ except Exception as e:
370
+ self.logger.critical(f"get_download_task 获取下载任务 {download_queue, block, timeout} 报错 {e}")
371
+ return False
372
+
373
+ def update_upload_task(self, upload_queue, task_item):
374
+ """
375
+ 更新任务
376
+ :param upload_queue:
377
+ :param task_item:
378
+ :return:
379
+ """
380
+ try:
381
+ task_item = upload_queue.put(task_item)
382
+ return task_item
383
+ except Exception as e:
384
+ self.logger.critical(f"update_upload_task 更新任务 {upload_queue, task_item} 报错 {e}")
385
+ return False
386
+
387
+ def reboot_process(self):
388
+ pass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xtn-tools-pro
3
- Version: 1.0.0.5.8
3
+ Version: 1.0.0.6.0
4
4
  Summary: xtn 开发工具
5
5
  Author: xtn
6
6
  Author-email: czw011122@gmail.com