pixelarraythirdparty 1.0.5__tar.gz → 1.0.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.
Files changed (20) hide show
  1. {pixelarraythirdparty-1.0.5 → pixelarraythirdparty-1.0.6}/PKG-INFO +1 -1
  2. {pixelarraythirdparty-1.0.5 → pixelarraythirdparty-1.0.6}/pixelarraythirdparty/__init__.py +3 -3
  3. pixelarraythirdparty-1.0.5/pixelarraythirdparty/celery/celery.py → pixelarraythirdparty-1.0.6/pixelarraythirdparty/cron/cron.py +16 -16
  4. {pixelarraythirdparty-1.0.5 → pixelarraythirdparty-1.0.6}/pixelarraythirdparty.egg-info/PKG-INFO +1 -1
  5. {pixelarraythirdparty-1.0.5 → pixelarraythirdparty-1.0.6}/pixelarraythirdparty.egg-info/SOURCES.txt +2 -2
  6. {pixelarraythirdparty-1.0.5 → pixelarraythirdparty-1.0.6}/pyproject.toml +1 -1
  7. {pixelarraythirdparty-1.0.5 → pixelarraythirdparty-1.0.6}/LICENSE +0 -0
  8. {pixelarraythirdparty-1.0.5 → pixelarraythirdparty-1.0.6}/MANIFEST.in +0 -0
  9. {pixelarraythirdparty-1.0.5 → pixelarraythirdparty-1.0.6}/pixelarraythirdparty/client.py +0 -0
  10. {pixelarraythirdparty-1.0.5/pixelarraythirdparty/celery → pixelarraythirdparty-1.0.6/pixelarraythirdparty/cron}/__init__.py +0 -0
  11. {pixelarraythirdparty-1.0.5 → pixelarraythirdparty-1.0.6}/pixelarraythirdparty/order/__init__.py +0 -0
  12. {pixelarraythirdparty-1.0.5 → pixelarraythirdparty-1.0.6}/pixelarraythirdparty/order/order.py +0 -0
  13. {pixelarraythirdparty-1.0.5 → pixelarraythirdparty-1.0.6}/pixelarraythirdparty/product/__init__.py +0 -0
  14. {pixelarraythirdparty-1.0.5 → pixelarraythirdparty-1.0.6}/pixelarraythirdparty/product/product.py +0 -0
  15. {pixelarraythirdparty-1.0.5 → pixelarraythirdparty-1.0.6}/pixelarraythirdparty/user/__init__.py +0 -0
  16. {pixelarraythirdparty-1.0.5 → pixelarraythirdparty-1.0.6}/pixelarraythirdparty/user/user.py +0 -0
  17. {pixelarraythirdparty-1.0.5 → pixelarraythirdparty-1.0.6}/pixelarraythirdparty.egg-info/dependency_links.txt +0 -0
  18. {pixelarraythirdparty-1.0.5 → pixelarraythirdparty-1.0.6}/pixelarraythirdparty.egg-info/requires.txt +0 -0
  19. {pixelarraythirdparty-1.0.5 → pixelarraythirdparty-1.0.6}/pixelarraythirdparty.egg-info/top_level.txt +0 -0
  20. {pixelarraythirdparty-1.0.5 → pixelarraythirdparty-1.0.6}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pixelarraythirdparty
3
- Version: 1.0.5
3
+ Version: 1.0.6
4
4
  Summary: PixelArray 第三方微服务客户端
5
5
  Author-email: Lu qi <qi.lu@pixelarrayai.com>
6
6
  License-Expression: MIT
@@ -6,18 +6,18 @@ PixelArray 第三方微服务客户端
6
6
  这个库包含了常用的开发工具和服务集成:
7
7
  - order: 订单管理模块和支付模块
8
8
  - product: 产品管理模块
9
- - celery: 定时任务管理模块
9
+ - cron: 定时任务管理模块
10
10
  - user: 用户管理模块
11
11
  """
12
12
 
13
- __version__ = "1.0.5"
13
+ __version__ = "1.0.6"
14
14
  __author__ = "Lu qi"
15
15
  __email__ = "qi.lu@pixelarrayai.com"
16
16
 
17
17
  # 导出主要模块
18
18
  __all__ = [
19
19
  "product",
20
- "celery",
20
+ "cron",
21
21
  "user",
22
22
  "order",
23
23
  ]
@@ -1,19 +1,19 @@
1
1
  from pixelarraythirdparty.client import Client
2
2
 
3
3
 
4
- class CeleryManager(Client):
5
- def get_celery_status(self):
4
+ class CronManager(Client):
5
+ def get_cron_status(self):
6
6
  """
7
- 获取Celery服务状态
7
+ 获取Cron服务状态
8
8
 
9
9
  功能说明:
10
- 获取Celery服务的运行状态,包括已注册的任务、工作节点状态等。
10
+ 获取Cron服务的运行状态,包括已注册的任务、工作节点状态等。
11
11
 
12
12
  输入参数:
13
13
 
14
14
 
15
15
  返回字段:
16
- data (dict): Celery服务状态信息
16
+ data (dict): Cron服务状态信息
17
17
  - registered_tasks (dict): 已注册的任务列表,按工作节点分组
18
18
  - worker_stats (dict): 工作节点统计信息
19
19
  - scheduled_task_count (int): 定时任务数量
@@ -21,19 +21,19 @@ class CeleryManager(Client):
21
21
  success (bool): 操作是否成功
22
22
 
23
23
  异常情况:
24
- - 获取Celery状态失败:返回错误信息"获取Celery状态失败"
24
+ - 获取Cron状态失败:返回错误信息"获取Cron状态失败"
25
25
  """
26
- data, success = self._request("GET", "/api/celery/status")
26
+ data, success = self._request("GET", "/api/cron/status")
27
27
  if not success:
28
28
  return {}, False
29
29
  return data, True
30
30
 
31
- def get_celery_tasks(self):
31
+ def get_cron_tasks(self):
32
32
  """
33
33
  获取已注册任务列表
34
34
 
35
35
  功能说明:
36
- 获取所有已注册的Celery任务列表。
36
+ 获取所有已注册的Cron任务列表。
37
37
 
38
38
  输入参数:
39
39
 
@@ -48,12 +48,12 @@ class CeleryManager(Client):
48
48
  异常情况:
49
49
  - 获取任务列表失败:返回错误信息"获取任务列表失败"
50
50
  """
51
- data, success = self._request("GET", "/api/celery/tasks")
51
+ data, success = self._request("GET", "/api/cron/tasks")
52
52
  if not success:
53
53
  return {}, False
54
54
  return data, True
55
55
 
56
- def get_celery_tasks_scheduled(self):
56
+ def get_cron_tasks_scheduled(self):
57
57
  """
58
58
  获取定时任务列表
59
59
 
@@ -85,12 +85,12 @@ class CeleryManager(Client):
85
85
  异常情况:
86
86
  - 获取定时任务列表失败:返回错误信息"获取定时任务列表失败"
87
87
  """
88
- data, success = self._request("GET", "/api/celery/tasks/scheduled")
88
+ data, success = self._request("GET", "/api/cron/tasks/scheduled")
89
89
  if not success:
90
90
  return {}, False
91
91
  return data, True
92
92
 
93
- def get_celery_tasks_detail(self, task_name: str):
93
+ def get_cron_tasks_detail(self, task_name: str):
94
94
  """
95
95
  获取任务详情
96
96
 
@@ -117,12 +117,12 @@ class CeleryManager(Client):
117
117
  - 任务不存在:返回错误信息"任务不存在"
118
118
  - 获取任务详情失败:返回错误信息"获取任务详情失败"
119
119
  """
120
- data, success = self._request("GET", f"/api/celery/tasks/{task_name}")
120
+ data, success = self._request("GET", f"/api/cron/tasks/{task_name}")
121
121
  if not success:
122
122
  return {}, False
123
123
  return data, True
124
124
 
125
- def trigger_celery_task(self, task_name: str, args: list, kwargs: dict):
125
+ def trigger_cron_task(self, task_name: str, args: list, kwargs: dict):
126
126
  """
127
127
  触发任务执行
128
128
 
@@ -148,7 +148,7 @@ class CeleryManager(Client):
148
148
  """
149
149
  data, success = self._request(
150
150
  "POST",
151
- f"/api/celery/tasks/{task_name}/trigger",
151
+ f"/api/cron/tasks/{task_name}/trigger",
152
152
  json={"args": args, "kwargs": kwargs},
153
153
  )
154
154
  if not success:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pixelarraythirdparty
3
- Version: 1.0.5
3
+ Version: 1.0.6
4
4
  Summary: PixelArray 第三方微服务客户端
5
5
  Author-email: Lu qi <qi.lu@pixelarrayai.com>
6
6
  License-Expression: MIT
@@ -8,8 +8,8 @@ pixelarraythirdparty.egg-info/SOURCES.txt
8
8
  pixelarraythirdparty.egg-info/dependency_links.txt
9
9
  pixelarraythirdparty.egg-info/requires.txt
10
10
  pixelarraythirdparty.egg-info/top_level.txt
11
- pixelarraythirdparty/celery/__init__.py
12
- pixelarraythirdparty/celery/celery.py
11
+ pixelarraythirdparty/cron/__init__.py
12
+ pixelarraythirdparty/cron/cron.py
13
13
  pixelarraythirdparty/order/__init__.py
14
14
  pixelarraythirdparty/order/order.py
15
15
  pixelarraythirdparty/product/__init__.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pixelarraythirdparty"
7
- version = "1.0.5"
7
+ version = "1.0.6"
8
8
  authors = [
9
9
  {name = "Lu qi", email = "qi.lu@pixelarrayai.com"},
10
10
  ]