xtn-tools-pro 1.0.0.5.8__py3-none-any.whl → 1.0.0.6.0__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.
- xtn_tools_pro/task_pro/go_fun_v2.py +34 -1
- {xtn_tools_pro-1.0.0.5.8.dist-info → xtn_tools_pro-1.0.0.6.0.dist-info}/METADATA +1 -1
- {xtn_tools_pro-1.0.0.5.8.dist-info → xtn_tools_pro-1.0.0.6.0.dist-info}/RECORD +6 -6
- {xtn_tools_pro-1.0.0.5.8.dist-info → xtn_tools_pro-1.0.0.6.0.dist-info}/LICENSE +0 -0
- {xtn_tools_pro-1.0.0.5.8.dist-info → xtn_tools_pro-1.0.0.6.0.dist-info}/WHEEL +0 -0
- {xtn_tools_pro-1.0.0.5.8.dist-info → xtn_tools_pro-1.0.0.6.0.dist-info}/top_level.txt +0 -0
@@ -133,7 +133,7 @@ class GoFunTaskV2:
|
|
133
133
|
go_task_fun_task_process.start()
|
134
134
|
|
135
135
|
while True:
|
136
|
-
logger.
|
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
|
@@ -11,7 +11,7 @@ xtn_tools_pro/proxy/__init__.py,sha256=WRwh6s2lruMu5buh0ejo9EK54kWT_VQhCsFGNFAmc
|
|
11
11
|
xtn_tools_pro/proxy/proxy.py,sha256=No6E1pFY5yx2F4976pXPrLtq-QEVp79KupzcufjSN58,8703
|
12
12
|
xtn_tools_pro/task_pro/__init__.py,sha256=nK3U47hWwE1H875ieEToH9r-jzXHS-PXk8cDstOvRE8,418
|
13
13
|
xtn_tools_pro/task_pro/go_fun.py,sha256=hWEt2uJ9FCvJH7PhVZttS-11A7J6zbRKwX7c5YLYQag,19144
|
14
|
-
xtn_tools_pro/task_pro/go_fun_v2.py,sha256=
|
14
|
+
xtn_tools_pro/task_pro/go_fun_v2.py,sha256=p1-2HWiC7OYhFqbJ_OC56wjvD0IXxcoq-egKf-RRl6Q,16847
|
15
15
|
xtn_tools_pro/utils/__init__.py,sha256=I1_n_NP23F2lBqlF4EOlnOdLYxM8M4pbn63UhJN1hRE,418
|
16
16
|
xtn_tools_pro/utils/crypto.py,sha256=RZ5AET4udlraACWMeNF-17JiZ2R6Ahb47_j4tjkV7LE,3190
|
17
17
|
xtn_tools_pro/utils/file_utils.py,sha256=VfdIxog4s1UW5NpKkCvQsUs9qHjLoNCnstZbnftkT4w,2046
|
@@ -20,8 +20,8 @@ xtn_tools_pro/utils/log.py,sha256=m0WtTWkkwtrki1ftP8vCDR8bMfK2gcfUGx5J2x2IlLQ,10
|
|
20
20
|
xtn_tools_pro/utils/retry.py,sha256=0wjHsR5DBBKpv4naMfxiky8kprrZes4WURIfFQ4H708,1657
|
21
21
|
xtn_tools_pro/utils/sql.py,sha256=EAKzbkZP7Q09j15Gm6o0_uq0qgQmcCQT6EAawbpp4v0,6263
|
22
22
|
xtn_tools_pro/utils/time_utils.py,sha256=TUtzG61PeVYXhaQd6pBrXAdlz7tBispNIRQRcGhE2No,4859
|
23
|
-
xtn_tools_pro-1.0.0.
|
24
|
-
xtn_tools_pro-1.0.0.
|
25
|
-
xtn_tools_pro-1.0.0.
|
26
|
-
xtn_tools_pro-1.0.0.
|
27
|
-
xtn_tools_pro-1.0.0.
|
23
|
+
xtn_tools_pro-1.0.0.6.0.dist-info/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
24
|
+
xtn_tools_pro-1.0.0.6.0.dist-info/METADATA,sha256=_duujWW1faktkv4NjXsR6mAUz9u7kAAv0NesLD3fABg,455
|
25
|
+
xtn_tools_pro-1.0.0.6.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
26
|
+
xtn_tools_pro-1.0.0.6.0.dist-info/top_level.txt,sha256=jyB3FLDEr8zE1U7wHczTgIbvUpALhR-ULF7RVEO7O2U,14
|
27
|
+
xtn_tools_pro-1.0.0.6.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|