p1-taskqueue 0.1.4__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: p1-taskqueue
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: A Task Queue Wrapper for Dekoruma Backend
5
5
  Author-email: Chalvin <engineering@dekoruma.com>
6
6
  Project-URL: Homepage, https://github.com/Dekoruma/p1-taskqueue
@@ -1,9 +1,9 @@
1
1
  taskqueue/__init__.py,sha256=gVDUAurwUijthE9_36FmhAQTBf7veGgjnew-amrTrmg,241
2
2
  taskqueue/celery_app.py,sha256=dUT-7XzsSQbr8vKrLv7f_6iYxTCUEJZHEt9fL-KIQ5U,3302
3
- taskqueue/cmanager.py,sha256=Xh89VbBYclb-RcmaisqEJfezkT-isyWkQ3KHdSpf_aM,9821
3
+ taskqueue/cmanager.py,sha256=jFrunboXWpRP4yFASr62HfezUxJQ2b_V4046q-87L2k,10965
4
4
  taskqueue/libs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  taskqueue/libs/helper_test.py,sha256=_yfPhm_7CzbN30j7E_Ld5KwXRlGHhTNrRTOBZQySEIU,3656
6
- p1_taskqueue-0.1.4.dist-info/METADATA,sha256=uapQZwJie_JNIfgfJM2zLTXpDIsOVZHAB7ffZj9rvjY,1508
7
- p1_taskqueue-0.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
- p1_taskqueue-0.1.4.dist-info/top_level.txt,sha256=hA3SM1ik2K8iPqtlt_-_nJ4TAePwHPN3vsOc4EiynqU,10
9
- p1_taskqueue-0.1.4.dist-info/RECORD,,
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,14 +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 {}
213
+ logger.info(
214
+ f"[TaskQueue] Executing dynamic function: {function_name} with args: {args} and kwargs: {kwargs}, job_id: {job_id}")
212
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}")
213
218
  return None
214
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}")
215
222
  current_retries = getattr(self.request, 'retries', 0) or 0
216
223
  max_retries = self.max_retries or K_MAX_RETRY_COUNT
217
224
  if isinstance(retry, dict) and 'max_retries' in retry:
@@ -229,6 +236,7 @@ def dynamic_function_executor(self, module_path, function_name, args=None, kwarg
229
236
 
230
237
  @shared_task(bind=True, max_retries=K_MAX_RETRY_COUNT)
231
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
232
240
  try:
233
241
  module = importlib.import_module(module_path)
234
242
  class_obj = getattr(module, class_name)
@@ -236,9 +244,15 @@ def dynamic_class_method_executor(self, module_path, class_name, method_name, ar
236
244
  method = getattr(instance, method_name)
237
245
  args = args or []
238
246
  kwargs = kwargs or {}
247
+ logger.info(
248
+ f"[TaskQueue] Executing dynamic class method: {method_name} with args: {args} and kwargs: {kwargs}, job_id: {job_id}")
239
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}")
240
252
  return None
241
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}")
242
256
  current_retries = getattr(self.request, 'retries', 0) or 0
243
257
  max_retries = self.max_retries or K_MAX_RETRY_COUNT
244
258
  if isinstance(retry, dict) and 'max_retries' in retry: