Skip to content

Conversation

@sergey-misuk-valor
Copy link
Contributor

@sergey-misuk-valor sergey-misuk-valor commented Nov 17, 2025

Add possibility to create signatures from CeleryTaskModel instance.

Right now jobs created by inheriting CeleryTaskModel can be used in pretty simple scenarios. There is number of primitives in Celery that allow running tasks in sequence or in parallel:

group

The group primitive is a signature that takes a list of tasks that should be applied in parallel.

chain

The chain primitive lets us link together signatures so that one is called after the other, essentially forming a chain of callbacks.

chord

A chord is just like a group but with a callback. A chord consists of a header group and a body, where the body is a task that should execute after all of the tasks in the header are complete.

But in order to use them we need a support for signatures. A signature is a representation of a task that can be passed around. Though we can still create signatures from the raw Celery tasks, we loose connection between CeleryTaskModel and it's underlying task.

This feature allows generation of signatures from CeleryTaskModel. Those signatures contain not only information required for task execution, but also information required to update CeleryTaskModel status

@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2025

Codecov Report

❌ Patch coverage is 95.55556% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.37%. Comparing base (48a3afe) to head (a8d5591).

Files with missing lines Patch % Lines
src/django_celery_boost/task.py 92.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop       #6      +/-   ##
===========================================
+ Coverage    94.31%   94.37%   +0.05%     
===========================================
  Files            4        5       +1     
  Lines          352      391      +39     
  Branches        39       41       +2     
===========================================
+ Hits           332      369      +37     
- Misses          14       15       +1     
- Partials         6        7       +1     
Flag Coverage Δ
unittests 94.37% <95.55%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@saxix saxix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add human readable summary of the feature in the PR. what is the feature that we are adding from the "business/client/utiliser" point of view

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants