taskbadger 1.3.3__tar.gz → 1.3.4__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.
- {taskbadger-1.3.3 → taskbadger-1.3.4}/PKG-INFO +1 -1
- {taskbadger-1.3.3 → taskbadger-1.3.4}/pyproject.toml +1 -1
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/celery.py +6 -3
- {taskbadger-1.3.3 → taskbadger-1.3.4}/LICENSE +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/README.md +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/__init__.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/cli/__init__.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/cli/basics.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/cli/list_tasks.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/cli/utils.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/cli/wrapper.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/cli_main.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/config.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/decorators.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/exceptions.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/integrations.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/__init__.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/api/__init__.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/api/action_endpoints/__init__.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/api/action_endpoints/action_cancel.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/api/action_endpoints/action_create.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/api/action_endpoints/action_get.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/api/action_endpoints/action_list.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/api/action_endpoints/action_partial_update.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/api/action_endpoints/action_update.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/api/task_endpoints/__init__.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/api/task_endpoints/task_cancel.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/api/task_endpoints/task_create.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/api/task_endpoints/task_get.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/api/task_endpoints/task_list.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/api/task_endpoints/task_partial_update.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/api/task_endpoints/task_update.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/client.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/errors.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/models/__init__.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/models/action.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/models/action_config.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/models/action_request.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/models/action_request_config.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/models/paginated_task_list.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/models/patched_action_request.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/models/patched_action_request_config.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/models/patched_task_request.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/models/patched_task_request_data.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/models/status_enum.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/models/task.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/models/task_data.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/models/task_request.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/models/task_request_data.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/py.typed +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/types.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/mug.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/process.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/safe_sdk.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/sdk.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/systems/__init__.py +0 -0
- {taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/systems/celery.py +0 -0
|
@@ -102,7 +102,6 @@ class Task(celery.Task):
|
|
|
102
102
|
|
|
103
103
|
def apply_async(self, *args, **kwargs):
|
|
104
104
|
headers = kwargs.setdefault("headers", {})
|
|
105
|
-
headers["taskbadger_track"] = True
|
|
106
105
|
tb_kwargs = self._get_tb_kwargs(kwargs)
|
|
107
106
|
if kwargs.get("kwargs"):
|
|
108
107
|
# extract taskbadger options from task kwargs when supplied as keyword argument
|
|
@@ -110,7 +109,11 @@ class Task(celery.Task):
|
|
|
110
109
|
elif len(args) > 1 and isinstance(args[1], dict):
|
|
111
110
|
# extract taskbadger options from task kwargs when supplied as positional argument
|
|
112
111
|
tb_kwargs.update(self._get_tb_kwargs(args[1]))
|
|
113
|
-
|
|
112
|
+
|
|
113
|
+
if Badger.is_configured():
|
|
114
|
+
headers["taskbadger_track"] = True
|
|
115
|
+
headers[TB_KWARGS_ARG] = tb_kwargs
|
|
116
|
+
|
|
114
117
|
result = super().apply_async(*args, **kwargs)
|
|
115
118
|
|
|
116
119
|
tb_task_id = result.info.get(TB_TASK_ID) if result.info else None
|
|
@@ -150,13 +153,13 @@ class Task(celery.Task):
|
|
|
150
153
|
@before_task_publish.connect
|
|
151
154
|
def task_publish_handler(sender=None, headers=None, body=None, **kwargs):
|
|
152
155
|
headers = headers if "task" in headers else body
|
|
156
|
+
header_kwargs = headers.pop(TB_KWARGS_ARG, {}) # always remove TB headers
|
|
153
157
|
if sender.startswith("celery.") or not Badger.is_configured():
|
|
154
158
|
return
|
|
155
159
|
|
|
156
160
|
celery_system = Badger.current.settings.get_system_by_id("celery")
|
|
157
161
|
auto_track = celery_system and celery_system.track_task(sender)
|
|
158
162
|
manual_track = headers.get("taskbadger_track")
|
|
159
|
-
header_kwargs = headers.pop(TB_KWARGS_ARG, {})
|
|
160
163
|
if not manual_track and not auto_track:
|
|
161
164
|
return
|
|
162
165
|
|
|
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
|
{taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/api/action_endpoints/action_cancel.py
RENAMED
|
File without changes
|
{taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/api/action_endpoints/action_create.py
RENAMED
|
File without changes
|
{taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/api/action_endpoints/action_get.py
RENAMED
|
File without changes
|
{taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/api/action_endpoints/action_list.py
RENAMED
|
File without changes
|
|
File without changes
|
{taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/api/action_endpoints/action_update.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/api/task_endpoints/task_partial_update.py
RENAMED
|
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
|
{taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/models/patched_action_request_config.py
RENAMED
|
File without changes
|
|
File without changes
|
{taskbadger-1.3.3 → taskbadger-1.3.4}/taskbadger/internal/models/patched_task_request_data.py
RENAMED
|
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
|