p1-taskqueue 0.1.3__py3-none-any.whl → 0.1.5__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.
Potentially problematic release.
This version of p1-taskqueue might be problematic. Click here for more details.
- {p1_taskqueue-0.1.3.dist-info → p1_taskqueue-0.1.5.dist-info}/METADATA +1 -1
- p1_taskqueue-0.1.5.dist-info/RECORD +9 -0
- taskqueue/cmanager.py +18 -2
- taskqueue/libs/helper_test.py +1 -1
- p1_taskqueue-0.1.3.dist-info/RECORD +0 -9
- {p1_taskqueue-0.1.3.dist-info → p1_taskqueue-0.1.5.dist-info}/WHEEL +0 -0
- {p1_taskqueue-0.1.3.dist-info → p1_taskqueue-0.1.5.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
taskqueue/__init__.py,sha256=gVDUAurwUijthE9_36FmhAQTBf7veGgjnew-amrTrmg,241
|
|
2
|
+
taskqueue/celery_app.py,sha256=dUT-7XzsSQbr8vKrLv7f_6iYxTCUEJZHEt9fL-KIQ5U,3302
|
|
3
|
+
taskqueue/cmanager.py,sha256=jFrunboXWpRP4yFASr62HfezUxJQ2b_V4046q-87L2k,10965
|
|
4
|
+
taskqueue/libs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
taskqueue/libs/helper_test.py,sha256=_yfPhm_7CzbN30j7E_Ld5KwXRlGHhTNrRTOBZQySEIU,3656
|
|
6
|
+
p1_taskqueue-0.1.5.dist-info/METADATA,sha256=yLSKcc1vB-J51skVqKQGbJ6FPDgrJGDo3bpZ4a9xnX4,1508
|
|
7
|
+
p1_taskqueue-0.1.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
+
p1_taskqueue-0.1.5.dist-info/top_level.txt,sha256=hA3SM1ik2K8iPqtlt_-_nJ4TAePwHPN3vsOc4EiynqU,10
|
|
9
|
+
p1_taskqueue-0.1.5.dist-info/RECORD,,
|
taskqueue/cmanager.py
CHANGED
|
@@ -204,13 +204,21 @@ cm = CManager()
|
|
|
204
204
|
# Dynamic task executors - handle function and class method execution
|
|
205
205
|
@shared_task(bind=True, max_retries=K_MAX_RETRY_COUNT)
|
|
206
206
|
def dynamic_function_executor(self, module_path, function_name, args=None, kwargs=None, retry=None):
|
|
207
|
+
job_id = self.request.id
|
|
207
208
|
try:
|
|
208
209
|
module = importlib.import_module(module_path)
|
|
209
210
|
function = getattr(module, function_name)
|
|
210
211
|
args = args or []
|
|
211
212
|
kwargs = kwargs or {}
|
|
212
|
-
|
|
213
|
+
logger.info(
|
|
214
|
+
f"[TaskQueue] Executing dynamic function: {function_name} with args: {args} and kwargs: {kwargs}, job_id: {job_id}")
|
|
215
|
+
function(*args, **kwargs)
|
|
216
|
+
logger.info(
|
|
217
|
+
f"[TaskQueue] Dynamic function execution completed successfully, function_name: {function_name}, args: {args}, kwargs: {kwargs}, job_id: {job_id}")
|
|
218
|
+
return None
|
|
213
219
|
except Exception as e:
|
|
220
|
+
logger.exception(
|
|
221
|
+
f"[TaskQueue] Error executing dynamic function: {function_name} with args: {args} and kwargs: {kwargs}, error_class: {e.__class__.__name__}, error: {e}, job_id: {job_id}")
|
|
214
222
|
current_retries = getattr(self.request, 'retries', 0) or 0
|
|
215
223
|
max_retries = self.max_retries or K_MAX_RETRY_COUNT
|
|
216
224
|
if isinstance(retry, dict) and 'max_retries' in retry:
|
|
@@ -228,6 +236,7 @@ def dynamic_function_executor(self, module_path, function_name, args=None, kwarg
|
|
|
228
236
|
|
|
229
237
|
@shared_task(bind=True, max_retries=K_MAX_RETRY_COUNT)
|
|
230
238
|
def dynamic_class_method_executor(self, module_path, class_name, method_name, args=None, kwargs=None, retry=None):
|
|
239
|
+
job_id = self.request.id
|
|
231
240
|
try:
|
|
232
241
|
module = importlib.import_module(module_path)
|
|
233
242
|
class_obj = getattr(module, class_name)
|
|
@@ -235,8 +244,15 @@ def dynamic_class_method_executor(self, module_path, class_name, method_name, ar
|
|
|
235
244
|
method = getattr(instance, method_name)
|
|
236
245
|
args = args or []
|
|
237
246
|
kwargs = kwargs or {}
|
|
238
|
-
|
|
247
|
+
logger.info(
|
|
248
|
+
f"[TaskQueue] Executing dynamic class method: {method_name} with args: {args} and kwargs: {kwargs}, job_id: {job_id}")
|
|
249
|
+
method(*args, **kwargs)
|
|
250
|
+
logger.info(
|
|
251
|
+
f"[TaskQueue] Dynamic class method execution completed successfully, method_name: {method_name}, args: {args}, kwargs: {kwargs}, job_id: {job_id}")
|
|
252
|
+
return None
|
|
239
253
|
except Exception as e:
|
|
254
|
+
logger.exception(
|
|
255
|
+
f"[TaskQueue] Error executing dynamic class method: {method_name} with args: {args} and kwargs: {kwargs}, error_class: {e.__class__.__name__}, error: {e}, job_id: {job_id}")
|
|
240
256
|
current_retries = getattr(self.request, 'retries', 0) or 0
|
|
241
257
|
max_retries = self.max_retries or K_MAX_RETRY_COUNT
|
|
242
258
|
if isinstance(retry, dict) and 'max_retries' in retry:
|
taskqueue/libs/helper_test.py
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
taskqueue/__init__.py,sha256=gVDUAurwUijthE9_36FmhAQTBf7veGgjnew-amrTrmg,241
|
|
2
|
-
taskqueue/celery_app.py,sha256=dUT-7XzsSQbr8vKrLv7f_6iYxTCUEJZHEt9fL-KIQ5U,3302
|
|
3
|
-
taskqueue/cmanager.py,sha256=Ec9Z6JgreJWR4p56qO0cAGAjO7d4UJmZ8vVmSOAetms,9795
|
|
4
|
-
taskqueue/libs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
taskqueue/libs/helper_test.py,sha256=6-LRaPes3xiP0WM5ag6cNpNSWAGXQqlnyiZcl1S0uUA,3657
|
|
6
|
-
p1_taskqueue-0.1.3.dist-info/METADATA,sha256=Js3lIo24P65dx0a7J74z6Pv7jhjonR1mtF9IjTSosus,1508
|
|
7
|
-
p1_taskqueue-0.1.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
-
p1_taskqueue-0.1.3.dist-info/top_level.txt,sha256=hA3SM1ik2K8iPqtlt_-_nJ4TAePwHPN3vsOc4EiynqU,10
|
|
9
|
-
p1_taskqueue-0.1.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|