xtn-tools-pro 1.0.0.4.5__tar.gz → 1.0.0.4.6__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.
- {xtn-tools-pro-1.0.0.4.5/xtn_tools_pro.egg-info → xtn-tools-pro-1.0.0.4.6}/PKG-INFO +1 -1
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/setup.py +1 -1
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro/task_pro/go_fun.py +19 -1
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6/xtn_tools_pro.egg-info}/PKG-INFO +1 -1
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/LICENSE +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/README.md +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/setup.cfg +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro/__init__.py +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro/db/MongoDB.py +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro/db/MysqlDB.py +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro/db/RedisDB.py +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro/db/__init__.py +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro/proxy/XiaoXiangProxy.py +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro/proxy/__init__.py +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro/proxy/proxy.py +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro/task_pro/__init__.py +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro/tools.py +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro/utils/__init__.py +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro/utils/crypto.py +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro/utils/file_utils.py +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro/utils/helpers.py +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro/utils/log.py +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro/utils/retry.py +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro/utils/sql.py +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro/utils/time_utils.py +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro.egg-info/SOURCES.txt +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro.egg-info/dependency_links.txt +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro.egg-info/requires.txt +0 -0
- {xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro.egg-info/top_level.txt +0 -0
@@ -73,22 +73,40 @@ class GoFun:
|
|
73
73
|
return
|
74
74
|
|
75
75
|
# 共享任务队列
|
76
|
+
processes_list = []
|
76
77
|
manager = multiprocessing.Manager()
|
77
78
|
download_queue = multiprocessing.Queue()
|
78
79
|
upload_queue = multiprocessing.Queue()
|
79
80
|
proxies_dict = manager.dict()
|
80
81
|
download_task_process = multiprocessing.Process(target=self._download_and_upload_task,
|
82
|
+
name="_download_and_upload_task",
|
81
83
|
args=(download_queue, upload_queue, proxies_dict,
|
82
84
|
self.__ini_info, logger))
|
85
|
+
processes_list.append(download_task_process)
|
83
86
|
download_task_process.start()
|
84
87
|
|
85
88
|
# 根据配置启动任务
|
86
89
|
if go_task_function:
|
87
90
|
go_task_fun_process = multiprocessing.Process(target=self._go_task_fun_task,
|
91
|
+
name="_go_task_fun_task",
|
88
92
|
args=(download_queue, upload_queue, proxies_dict,
|
89
93
|
self.__ini_info, go_task_function, logger))
|
94
|
+
processes_list.append(go_task_fun_process)
|
90
95
|
go_task_fun_process.start()
|
91
|
-
|
96
|
+
|
97
|
+
while True:
|
98
|
+
for p in processes_list:
|
99
|
+
# 检查子进程是否存活
|
100
|
+
logger.info(f"{p.is_alive()} {p.name} {p.pid} {p}")
|
101
|
+
if not p.is_alive():
|
102
|
+
print(f"Worker {p.name} is dead. Restarting...")
|
103
|
+
# 进程死掉,重新启动
|
104
|
+
# processes.remove(p)
|
105
|
+
# new_p = multiprocessing.Process(target=worker, args=(f"Worker-{len(processes) + 1}",))
|
106
|
+
# processes.append(new_p)
|
107
|
+
# new_p.start()
|
108
|
+
|
109
|
+
time.sleep(10)
|
92
110
|
|
93
111
|
download_task_process.join()
|
94
112
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{xtn-tools-pro-1.0.0.4.5 → xtn-tools-pro-1.0.0.4.6}/xtn_tools_pro.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|