xtn-tools-pro 1.0.0.6.9__py3-none-any.whl → 1.0.0.7.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.
- xtn_tools_pro/task_pro/go_fun_v3.py +1 -0
- xtn_tools_pro/utils/helpers.py +19 -0
- {xtn_tools_pro-1.0.0.6.9.dist-info → xtn_tools_pro-1.0.0.7.1.dist-info}/METADATA +1 -1
- {xtn_tools_pro-1.0.0.6.9.dist-info → xtn_tools_pro-1.0.0.7.1.dist-info}/RECORD +7 -7
- {xtn_tools_pro-1.0.0.6.9.dist-info → xtn_tools_pro-1.0.0.7.1.dist-info}/LICENSE +0 -0
- {xtn_tools_pro-1.0.0.6.9.dist-info → xtn_tools_pro-1.0.0.7.1.dist-info}/WHEEL +0 -0
- {xtn_tools_pro-1.0.0.6.9.dist-info → xtn_tools_pro-1.0.0.7.1.dist-info}/top_level.txt +0 -0
@@ -111,6 +111,7 @@ class GoFunTaskV3:
|
|
111
111
|
qsize = self.download_queue.qsize()
|
112
112
|
if not go_process_list and self.manager_info["gofun_kill_status"] and qsize:
|
113
113
|
# 状态错误
|
114
|
+
go_task_status_error += 1
|
114
115
|
if go_task_status_error >= 10:
|
115
116
|
self.manager_info["gofun_kill_status"] = False
|
116
117
|
logger.critical(
|
xtn_tools_pro/utils/helpers.py
CHANGED
@@ -12,8 +12,10 @@ import re
|
|
12
12
|
import uuid
|
13
13
|
import math
|
14
14
|
import json
|
15
|
+
import random
|
15
16
|
from uuid import UUID
|
16
17
|
from pprint import pformat
|
18
|
+
from datetime import datetime
|
17
19
|
from urllib.parse import urlencode
|
18
20
|
|
19
21
|
|
@@ -111,6 +113,7 @@ def get_calculate_total_page(total, limit):
|
|
111
113
|
total_pages = math.ceil(total / limit)
|
112
114
|
return total_pages
|
113
115
|
|
116
|
+
|
114
117
|
def get_build_url_with_params(url, params):
|
115
118
|
"""
|
116
119
|
传入url和params拼接完整的url ->效果 https://wwww.xxxx.com/?xxx1=1&xxx2=2
|
@@ -123,8 +126,24 @@ def get_build_url_with_params(url, params):
|
|
123
126
|
return full_url
|
124
127
|
|
125
128
|
|
129
|
+
def get_orderId_random(prefix="", suffix=""):
|
130
|
+
"""
|
131
|
+
随机生成20位订单号,前部分由年月日时分秒组成
|
132
|
+
:param prefix: 自定义前缀
|
133
|
+
:param suffix: 自定义后缀
|
134
|
+
:return:
|
135
|
+
"""
|
136
|
+
current_time = datetime.now()
|
137
|
+
date_time_str = current_time.strftime("%y%m%d%H%M%S")
|
138
|
+
# 生成随机部分
|
139
|
+
random_number = ''.join(random.choices('0123456789', k=8))
|
140
|
+
# 组合成完整的数字
|
141
|
+
combined_number = int(date_time_str + random_number)
|
142
|
+
return f"{prefix}{combined_number}{suffix}"
|
143
|
+
|
126
144
|
|
127
145
|
if __name__ == '__main__':
|
128
146
|
# print(get_uuid(4))
|
129
147
|
from faker import Faker
|
130
148
|
|
149
|
+
print(get_orderId_random())
|
@@ -12,17 +12,17 @@ xtn_tools_pro/proxy/proxy.py,sha256=No6E1pFY5yx2F4976pXPrLtq-QEVp79KupzcufjSN58,
|
|
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
14
|
xtn_tools_pro/task_pro/go_fun_v2.py,sha256=SgcXgtEBGSVL1V2LyqO0z8Md2H8JZxucYrLLIwqtiLM,18489
|
15
|
-
xtn_tools_pro/task_pro/go_fun_v3.py,sha256=
|
15
|
+
xtn_tools_pro/task_pro/go_fun_v3.py,sha256=wPd7LFQlDhLH-5SIlq_1k8og5oW6KWeY6g3QvmZSFSU,16013
|
16
16
|
xtn_tools_pro/utils/__init__.py,sha256=I1_n_NP23F2lBqlF4EOlnOdLYxM8M4pbn63UhJN1hRE,418
|
17
17
|
xtn_tools_pro/utils/crypto.py,sha256=RZ5AET4udlraACWMeNF-17JiZ2R6Ahb47_j4tjkV7LE,3190
|
18
18
|
xtn_tools_pro/utils/file_utils.py,sha256=VfdIxog4s1UW5NpKkCvQsUs9qHjLoNCnstZbnftkT4w,2046
|
19
|
-
xtn_tools_pro/utils/helpers.py,sha256=
|
19
|
+
xtn_tools_pro/utils/helpers.py,sha256=H-a3gnahIah3kJqyKzzKlPWtVQYcFlJncz2rAfBqIiw,4444
|
20
20
|
xtn_tools_pro/utils/log.py,sha256=m0WtTWkkwtrki1ftP8vCDR8bMfK2gcfUGx5J2x2IlLQ,10138
|
21
21
|
xtn_tools_pro/utils/retry.py,sha256=0wjHsR5DBBKpv4naMfxiky8kprrZes4WURIfFQ4H708,1657
|
22
22
|
xtn_tools_pro/utils/sql.py,sha256=EAKzbkZP7Q09j15Gm6o0_uq0qgQmcCQT6EAawbpp4v0,6263
|
23
23
|
xtn_tools_pro/utils/time_utils.py,sha256=TUtzG61PeVYXhaQd6pBrXAdlz7tBispNIRQRcGhE2No,4859
|
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.
|
28
|
-
xtn_tools_pro-1.0.0.
|
24
|
+
xtn_tools_pro-1.0.0.7.1.dist-info/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
25
|
+
xtn_tools_pro-1.0.0.7.1.dist-info/METADATA,sha256=Yl6AU8kAvrr4nKEBgCHpLCJbOXtZ7UksCEF7XU-Gtuo,455
|
26
|
+
xtn_tools_pro-1.0.0.7.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
27
|
+
xtn_tools_pro-1.0.0.7.1.dist-info/top_level.txt,sha256=jyB3FLDEr8zE1U7wHczTgIbvUpALhR-ULF7RVEO7O2U,14
|
28
|
+
xtn_tools_pro-1.0.0.7.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|