p1-taskqueue 0.1.19__tar.gz → 0.1.21__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.
- {p1_taskqueue-0.1.19 → p1_taskqueue-0.1.21}/PKG-INFO +1 -1
- {p1_taskqueue-0.1.19 → p1_taskqueue-0.1.21}/pyproject.toml +1 -1
- {p1_taskqueue-0.1.19 → p1_taskqueue-0.1.21}/src/p1_taskqueue.egg-info/PKG-INFO +1 -1
- {p1_taskqueue-0.1.19 → p1_taskqueue-0.1.21}/src/taskqueue/cmanager.py +9 -2
- {p1_taskqueue-0.1.19 → p1_taskqueue-0.1.21}/README.md +0 -0
- {p1_taskqueue-0.1.19 → p1_taskqueue-0.1.21}/setup.cfg +0 -0
- {p1_taskqueue-0.1.19 → p1_taskqueue-0.1.21}/src/p1_taskqueue.egg-info/SOURCES.txt +0 -0
- {p1_taskqueue-0.1.19 → p1_taskqueue-0.1.21}/src/p1_taskqueue.egg-info/dependency_links.txt +0 -0
- {p1_taskqueue-0.1.19 → p1_taskqueue-0.1.21}/src/p1_taskqueue.egg-info/requires.txt +0 -0
- {p1_taskqueue-0.1.19 → p1_taskqueue-0.1.21}/src/p1_taskqueue.egg-info/top_level.txt +0 -0
- {p1_taskqueue-0.1.19 → p1_taskqueue-0.1.21}/src/taskqueue/__init__.py +0 -0
- {p1_taskqueue-0.1.19 → p1_taskqueue-0.1.21}/src/taskqueue/celery_app.py +0 -0
- {p1_taskqueue-0.1.19 → p1_taskqueue-0.1.21}/src/taskqueue/libs/__init__.py +0 -0
- {p1_taskqueue-0.1.19 → p1_taskqueue-0.1.21}/src/taskqueue/libs/helper_test.py +0 -0
- {p1_taskqueue-0.1.19 → p1_taskqueue-0.1.21}/src/taskqueue/slack_notifier.py +0 -0
- {p1_taskqueue-0.1.19 → p1_taskqueue-0.1.21}/tests/test_celery_app.py +0 -0
- {p1_taskqueue-0.1.19 → p1_taskqueue-0.1.21}/tests/test_cmanager.py +0 -0
- {p1_taskqueue-0.1.19 → p1_taskqueue-0.1.21}/tests/test_helper_test_functions.py +0 -0
- {p1_taskqueue-0.1.19 → p1_taskqueue-0.1.21}/tests/test_return_values.py +0 -0
- {p1_taskqueue-0.1.19 → p1_taskqueue-0.1.21}/tests/test_test_utils.py +0 -0
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "p1-taskqueue"
|
|
7
7
|
# DO NOT CHANGE THIS VERSION - it gets automatically replaced by CI/CD with the git tag version
|
|
8
|
-
version = "0.1.
|
|
8
|
+
version = "0.1.21"
|
|
9
9
|
description = "A Task Queue Wrapper for Dekoruma Backend"
|
|
10
10
|
authors = [
|
|
11
11
|
{name = "Chalvin", email = "engineering@dekoruma.com"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import importlib
|
|
2
2
|
import inspect
|
|
3
3
|
import logging
|
|
4
|
+
from datetime import datetime
|
|
4
5
|
from typing import Any
|
|
5
6
|
from typing import Dict
|
|
6
7
|
from typing import Tuple
|
|
@@ -18,7 +19,7 @@ K_ENQUEUE_OP_TYPE_ENQUEUE_AT = 'enqueue_at'
|
|
|
18
19
|
K_ENQUEUE_OP_TYPE_ENQUEUE_IN = 'enqueue_in'
|
|
19
20
|
|
|
20
21
|
K_MAX_RETRY_COUNT = 3
|
|
21
|
-
K_DEFAULT_RETRY_COUNTDOWN =
|
|
22
|
+
K_DEFAULT_RETRY_COUNTDOWN = 3600
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
def _is_class_method(func: Any) -> bool:
|
|
@@ -238,7 +239,13 @@ class CManager:
|
|
|
238
239
|
job_timeout = queue_kwargs.pop("job_timeout", None)
|
|
239
240
|
retry_policy = queue_kwargs.pop("retry", None)
|
|
240
241
|
|
|
241
|
-
|
|
242
|
+
created_at = datetime.now().isoformat()
|
|
243
|
+
|
|
244
|
+
send_opts: Dict[str, Any] = {
|
|
245
|
+
"headers": {
|
|
246
|
+
"created_at": created_at
|
|
247
|
+
}
|
|
248
|
+
}
|
|
242
249
|
if queue_name:
|
|
243
250
|
send_opts["queue"] = queue_name
|
|
244
251
|
if job_timeout is not None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|