MeUtils 2024.12.2.10.56.44__py3-none-any.whl → 2024.12.2.11.50.27__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.
- {MeUtils-2024.12.2.10.56.44.dist-info → MeUtils-2024.12.2.11.50.27.dist-info}/METADATA +27 -27
- {MeUtils-2024.12.2.10.56.44.dist-info → MeUtils-2024.12.2.11.50.27.dist-info}/RECORD +10 -10
- meutils/async_task/celery_config.py +2 -0
- meutils/async_task/utils.py +13 -10
- meutils/data/VERSION +1 -1
- meutils/db/redis_db.py +2 -2
- {MeUtils-2024.12.2.10.56.44.dist-info → MeUtils-2024.12.2.11.50.27.dist-info}/LICENSE +0 -0
- {MeUtils-2024.12.2.10.56.44.dist-info → MeUtils-2024.12.2.11.50.27.dist-info}/WHEEL +0 -0
- {MeUtils-2024.12.2.10.56.44.dist-info → MeUtils-2024.12.2.11.50.27.dist-info}/entry_points.txt +0 -0
- {MeUtils-2024.12.2.10.56.44.dist-info → MeUtils-2024.12.2.11.50.27.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: MeUtils
|
3
|
-
Version: 2024.12.2.
|
3
|
+
Version: 2024.12.2.11.50.27
|
4
4
|
Summary: description
|
5
5
|
Home-page: https://github.com/yuanjie-ai/MeUtils
|
6
6
|
Author: yuanjie
|
@@ -61,42 +61,42 @@ Requires-Dist: sse-starlette ; extra == 'ai'
|
|
61
61
|
Requires-Dist: openai ; extra == 'ai'
|
62
62
|
Requires-Dist: langchain ; extra == 'ai'
|
63
63
|
Provides-Extra: all
|
64
|
-
Requires-Dist:
|
65
|
-
Requires-Dist:
|
66
|
-
Requires-Dist:
|
67
|
-
Requires-Dist:
|
64
|
+
Requires-Dist: reportlab ; extra == 'all'
|
65
|
+
Requires-Dist: pymysql ; extra == 'all'
|
66
|
+
Requires-Dist: sse-starlette ; extra == 'all'
|
67
|
+
Requires-Dist: redis-py-cluster ; extra == 'all'
|
68
68
|
Requires-Dist: pretty-errors ; extra == 'all'
|
69
|
-
Requires-Dist:
|
70
|
-
Requires-Dist:
|
69
|
+
Requires-Dist: streamlit ; extra == 'all'
|
70
|
+
Requires-Dist: thefuck ; extra == 'all'
|
71
|
+
Requires-Dist: fastapi ; extra == 'all'
|
72
|
+
Requires-Dist: pymupd ; extra == 'all'
|
73
|
+
Requires-Dist: sqlalchemy ; extra == 'all'
|
74
|
+
Requires-Dist: pymongo ; extra == 'all'
|
71
75
|
Requires-Dist: schedule ; extra == 'all'
|
76
|
+
Requires-Dist: polars ; extra == 'all'
|
72
77
|
Requires-Dist: thriftpy2 ; extra == 'all'
|
73
|
-
Requires-Dist:
|
74
|
-
Requires-Dist: iteration-utilities ; extra == 'all'
|
78
|
+
Requires-Dist: pymilvus ; extra == 'all'
|
75
79
|
Requires-Dist: pandas-profiling[notebook] ; extra == 'all'
|
76
|
-
Requires-Dist:
|
77
|
-
Requires-Dist:
|
78
|
-
Requires-Dist: pyarrow ; extra == 'all'
|
79
|
-
Requires-Dist: faiss-cpu ; extra == 'all'
|
80
|
+
Requires-Dist: uvicorn ; extra == 'all'
|
81
|
+
Requires-Dist: cachetools ; extra == 'all'
|
80
82
|
Requires-Dist: pandas-summary ; extra == 'all'
|
81
|
-
Requires-Dist:
|
83
|
+
Requires-Dist: langchain ; extra == 'all'
|
82
84
|
Requires-Dist: seaborn ; extra == 'all'
|
83
|
-
Requires-Dist:
|
85
|
+
Requires-Dist: faiss-cpu ; extra == 'all'
|
86
|
+
Requires-Dist: jieba ; extra == 'all'
|
87
|
+
Requires-Dist: asyncmy ; extra == 'all'
|
88
|
+
Requires-Dist: jinja2 ; extra == 'all'
|
89
|
+
Requires-Dist: geopy ; extra == 'all'
|
90
|
+
Requires-Dist: gunicorn ; extra == 'all'
|
91
|
+
Requires-Dist: missingno ; extra == 'all'
|
84
92
|
Requires-Dist: jmespath ; extra == 'all'
|
85
|
-
Requires-Dist: pymysql ; extra == 'all'
|
86
|
-
Requires-Dist: pymongo ; extra == 'all'
|
87
93
|
Requires-Dist: openai ; extra == 'all'
|
94
|
+
Requires-Dist: pyarrow ; extra == 'all'
|
88
95
|
Requires-Dist: filetype ; extra == 'all'
|
89
|
-
Requires-Dist:
|
90
|
-
Requires-Dist:
|
91
|
-
Requires-Dist: reportlab ; extra == 'all'
|
92
|
-
Requires-Dist: redis-py-cluster ; extra == 'all'
|
93
|
-
Requires-Dist: asyncmy ; extra == 'all'
|
94
|
-
Requires-Dist: fastapi ; extra == 'all'
|
96
|
+
Requires-Dist: iteration-utilities ; extra == 'all'
|
97
|
+
Requires-Dist: dataframe-image ; extra == 'all'
|
95
98
|
Requires-Dist: simplejson ; extra == 'all'
|
96
|
-
Requires-Dist:
|
97
|
-
Requires-Dist: thefuck ; extra == 'all'
|
98
|
-
Requires-Dist: polars ; extra == 'all'
|
99
|
-
Requires-Dist: missingno ; extra == 'all'
|
99
|
+
Requires-Dist: fastapi[all] ; extra == 'all'
|
100
100
|
Provides-Extra: ann
|
101
101
|
Requires-Dist: pymilvus ; extra == 'ann'
|
102
102
|
Requires-Dist: faiss-cpu ; extra == 'ann'
|
@@ -416,10 +416,10 @@ meutils/apis/voice_clone/__init__.py,sha256=y7Rpn90LocHhA0ywrDP_fT4QAK7sr4JsIX5w
|
|
416
416
|
meutils/apis/voice_clone/fish.py,sha256=6m8zcS2KEqmalKy2ArnOaNovyxsQp_sw4d_O1kVZR2s,7146
|
417
417
|
meutils/apis/voice_clone/fish_api.py,sha256=pDpE-B8HFiGIOV3NVd1HmFrCC2GQc3wH-81oNbTS0mY,307
|
418
418
|
meutils/async_task/__init__.py,sha256=45cUr-GWvQ1JFYGOYPOIkHLyTR3JbfP_PEYrmktpMLo,367
|
419
|
-
meutils/async_task/celery_config.py,sha256=
|
419
|
+
meutils/async_task/celery_config.py,sha256=BX1h3jY34aO6UmUFakdBUwOdsEiOxCGuUtYDUKFtafc,3461
|
420
420
|
meutils/async_task/common.py,sha256=ZJ4e0CsEJf1ppPmGSwPCwhZBAkUL5xsi_t1ny-bJuko,845
|
421
421
|
meutils/async_task/demo_create_tasks.py,sha256=Eu4XjNxRROmMJ0oKfbEhrfLTaOUgedbAhmFyQx5nOQc,2699
|
422
|
-
meutils/async_task/utils.py,sha256=
|
422
|
+
meutils/async_task/utils.py,sha256=MbG3f6d3PYWySp4P74rw3DCKgWyinyEBjMJBKBPmLlE,5563
|
423
423
|
meutils/async_task/通用设计.py,sha256=kGdrJHJu9VoOkyGHREn0KUtBTibAaLIcG0O6hEJNhLA,3232
|
424
424
|
meutils/async_task/tasks/__init__.py,sha256=flHRXJMdts_9az9T9V1c5l3Y-gaDD88COWrARr4WAKU,246
|
425
425
|
meutils/async_task/tasks/_all.py,sha256=Vz63k9yvgj-IBGjekm0u2t571TTT0nMRMqcPvPqJAbY,533
|
@@ -460,7 +460,7 @@ meutils/config_utils/lark_utils/demo.py,sha256=3g0Fs7oLaeW75T60gYWMLgyNg1OnfOjfH
|
|
460
460
|
meutils/config_utils/lark_utils/x.py,sha256=MlMQGhehP9xMEgetxVCX68XFaosfKoW1JA5cZ3JqN2w,1857
|
461
461
|
meutils/crawlers/__init__.py,sha256=TBU4xA-IOsHV-0yIkW7YXxn_QT7TT8NncqxO7IykEfs,271
|
462
462
|
meutils/data/SimHei.ttf,sha256=-XEnekS5yHP_URkT4XBI2w22ylV-KxudhkeIYFbrILA,10062565
|
463
|
-
meutils/data/VERSION,sha256=
|
463
|
+
meutils/data/VERSION,sha256=oGyFhh775J26HbWxepBbFfL0hO3q7_7RvPBFa2cnntU,19
|
464
464
|
meutils/data/_FLAG,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
465
465
|
meutils/data/_SUCCESS,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
466
466
|
meutils/data/__init__.py,sha256=Hfwkkxs4zHqKhxht0YrhS566a9P5axtmgNvM5wF8ceQ,243
|
@@ -473,7 +473,7 @@ meutils/db/__init__.py,sha256=HR99rqxoFTWXUHDhLVl33tzIn8M86gigHLmEzOKH1Ec,7637
|
|
473
473
|
meutils/db/mongo.py,sha256=B-B_t939rxtnNGt0PxhivjIUwinmHPzLUpXsjUIaTkQ,2337
|
474
474
|
meutils/db/neo4j.py,sha256=eYd3jP3COWlOFBaF20UXphW67-HwlZ1t0Q34Cp-j6o0,2168
|
475
475
|
meutils/db/orm.py,sha256=dyV8tlVDUw_8tS6uiz_nyPzpNg8UX-ob7zarLVfvvqE,4060
|
476
|
-
meutils/db/redis_db.py,sha256=
|
476
|
+
meutils/db/redis_db.py,sha256=Br2AAB8S2lkvLP1ppp7feaFvWGn_MSdw_CDW2lcoIno,2385
|
477
477
|
meutils/decorators/__ai.py,sha256=QAz005-Wa-sp0YUUoelaR1pMbt6hPSBML5j0My6TbEI,1681
|
478
478
|
meutils/decorators/__init__.py,sha256=hgpHo40pfFWYXEnrW74o8W7SIfCD0GHr3gnujBw1hIQ,3284
|
479
479
|
meutils/decorators/cache.py,sha256=-sqhCuiSYZK1UtsRw7bBog19G65O9N27DVTAp_nlBk4,2972
|
@@ -793,9 +793,9 @@ meutils/tools/seize.py,sha256=nOKAS63w-Lbi48I0m2MPhdsokUTwxco0laPxYVmW4Mw,1064
|
|
793
793
|
meutils/tools/service_monitor.py,sha256=ibsLtBN2g2DL7ZnLJ8vhiZOiOcqTAyx711djDdBK-3M,1255
|
794
794
|
meutils/tools/sys_monitor.py,sha256=6MoyzrItqDUOSjfHcMJmMofQkEPTW36CT_aKui0rg84,429
|
795
795
|
meutils/tools/token_monitor.py,sha256=Np-YK-R4P4IPAXyZvMxwvXI4sFmNJQAQK1lSegNaYpA,997
|
796
|
-
MeUtils-2024.12.2.
|
797
|
-
MeUtils-2024.12.2.
|
798
|
-
MeUtils-2024.12.2.
|
799
|
-
MeUtils-2024.12.2.
|
800
|
-
MeUtils-2024.12.2.
|
801
|
-
MeUtils-2024.12.2.
|
796
|
+
MeUtils-2024.12.2.11.50.27.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
797
|
+
MeUtils-2024.12.2.11.50.27.dist-info/METADATA,sha256=RtWelX_xSuEYF8775NX0U2C_AA6j8XbkuX6NOfi64O4,6143
|
798
|
+
MeUtils-2024.12.2.11.50.27.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
799
|
+
MeUtils-2024.12.2.11.50.27.dist-info/entry_points.txt,sha256=lufZlBHRqqZKdY-ZQJ4CSZb0qhV5hQC37egZna9M7ug,357
|
800
|
+
MeUtils-2024.12.2.11.50.27.dist-info/top_level.txt,sha256=cInfxMmkgNOskurdjwP5unau4rA7Uw48nu07tYhS7KY,22
|
801
|
+
MeUtils-2024.12.2.11.50.27.dist-info/RECORD,,
|
@@ -19,6 +19,8 @@ broker_url = os.getenv('REDIS_URL', broker_url)
|
|
19
19
|
# result_backend = f"redis://localhost:6379/1" # 结果存储
|
20
20
|
result_backend = f"{broker_url.replace('/0', '')}/1" # 结果存储
|
21
21
|
|
22
|
+
# logger.debug(result_backend)
|
23
|
+
|
22
24
|
# 添加以下配置增加可靠性
|
23
25
|
broker_connection_retry = True
|
24
26
|
broker_connection_max_retries = 5
|
meutils/async_task/utils.py
CHANGED
@@ -63,23 +63,26 @@ async def get_task(
|
|
63
63
|
}
|
64
64
|
:return:
|
65
65
|
"""
|
66
|
-
await redis_aclient.select(1) # 切到 celery
|
67
|
-
if not await redis_aclient.get(task_id):
|
68
|
-
raise HTTPException(status_code=404, detail="TaskID not found")
|
69
|
-
|
70
66
|
filter_kwargs = filter_kwargs or {}
|
71
67
|
filter_kwargs["task_id"] = task_id
|
72
68
|
|
73
69
|
result = AsyncResult(id=task_id)
|
74
|
-
|
75
|
-
# logger.debug(bjson(result.get()))
|
70
|
+
logger.debug(bjson(result._get_task_meta()))
|
71
|
+
# logger.debug(bjson(result.get(timeout=30)))
|
72
|
+
logger.debug(result)
|
73
|
+
logger.debug(result.ready())
|
74
|
+
logger.debug(result.state)
|
76
75
|
|
77
|
-
|
78
|
-
|
79
|
-
|
76
|
+
# if result.status=="PENDING": # worker可能还未启动,会阻塞
|
77
|
+
# if await redis_aclient.select(1) and not await redis_aclient.exists(f"celery-task-meta-{task_id}"):
|
78
|
+
# raise HTTPException(status_code=404, detail="TaskID not found")
|
80
79
|
|
81
80
|
if result.ready():
|
82
81
|
if result.successful():
|
82
|
+
data = result.get(timeout=30).copy() # 创建任务时:remote task的返回结果 ####### copy避免丢失字段
|
83
|
+
logger.debug(bjson(data))
|
84
|
+
token = data.pop("system_fingerprint", None) # 远程任务 token/apikey
|
85
|
+
|
83
86
|
remote_task_id = (
|
84
87
|
data.get("task_id") # 提前写
|
85
88
|
or data.get("data", {}).get("task_id")
|
@@ -164,7 +167,7 @@ if __name__ == '__main__':
|
|
164
167
|
|
165
168
|
from meutils.apis.kling import kolors_virtual_try_on
|
166
169
|
|
167
|
-
task_id = "
|
170
|
+
task_id = "03f8990f-a196-4af3-88cb-727750e462d21"
|
168
171
|
# filter_kwargs = {
|
169
172
|
# "task_id": task_id, #########理论上只需这个
|
170
173
|
# "user_id": 1,
|
meutils/data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2024.12.02.
|
1
|
+
2024.12.02.11.50.27
|
meutils/db/redis_db.py
CHANGED
@@ -66,7 +66,7 @@ if __name__ == '__main__':
|
|
66
66
|
# _ = redis_client.lrange(feishu, 0, -1)
|
67
67
|
# print(len(eval(_)))
|
68
68
|
|
69
|
-
task_id = "celery-task-meta-
|
69
|
+
task_id = "celery-task-meta-ca94c602-a2cc-4db5-afe4-763f30df8a18"
|
70
70
|
|
71
71
|
|
72
72
|
# arun(redis_aclient.get('celery-task-meta-72d59447-1f88-4727-8067-8244c2268faa'))
|
@@ -75,7 +75,7 @@ if __name__ == '__main__':
|
|
75
75
|
|
76
76
|
async def main():
|
77
77
|
r = await redis_aclient.select(1)
|
78
|
-
|
78
|
+
return await redis_aclient.get(task_id)
|
79
79
|
|
80
80
|
|
81
81
|
arun(main())
|
File without changes
|
File without changes
|
{MeUtils-2024.12.2.10.56.44.dist-info → MeUtils-2024.12.2.11.50.27.dist-info}/entry_points.txt
RENAMED
File without changes
|
File without changes
|