Skip to content

Conversation

tcely
Copy link
Contributor

@tcely tcely commented Jun 30, 2025

Huey signal flows

django-background-tasks signal flows

Success:

  1. signals.task_started.send(Task)1
  2. signals.task_successful.send(sender=task.__class__, task_id=task.id, completed_task=completed)2
  3. signals.task_finished.send(Task)3

Error:

  1. signals.task_started.send(Task)1
  2. signals.task_error.send(sender=ex.__class__, task=task)4
  3. task_rescheduled.send(sender=self.__class__, task=self)5
  4. task_failed.send(sender=self.__class__, task_id=self.id, completed_task=completed)6
  5. signals.task_finished.send(Task)3

Available signals7:

task_created = django.dispatch.Signal(['task'])
task_error = django.dispatch.Signal(['task'])
task_rescheduled = django.dispatch.Signal(['task'])
task_failed = django.dispatch.Signal(['task_id', 'completed_task'])
task_successful = django.dispatch.Signal(['task_id', 'completed_task'])
task_started = django.dispatch.Signal()
task_finished = django.dispatch.Signal()

Footnotes

  1. https://github.com/tcely/django-background-tasks/blob/8b59a7e982d4b7a39f905c0037148194c71f09f2/background_task/tasks.py#L28 2

  2. https://github.com/tcely/django-background-tasks/blob/8b59a7e982d4b7a39f905c0037148194c71f09f2/background_task/tasks.py#L48-L49

  3. https://github.com/tcely/django-background-tasks/blob/8b59a7e982d4b7a39f905c0037148194c71f09f2/background_task/tasks.py#L61 2

  4. https://github.com/tcely/django-background-tasks/blob/8b59a7e982d4b7a39f905c0037148194c71f09f2/background_task/tasks.py#L58

  5. https://github.com/tcely/django-background-tasks/blob/8b59a7e982d4b7a39f905c0037148194c71f09f2/background_task/models.py#L264

  6. https://github.com/tcely/django-background-tasks/blob/8b59a7e982d4b7a39f905c0037148194c71f09f2/background_task/models.py#L255-L257

  7. https://github.com/tcely/django-background-tasks/blob/8b59a7e982d4b7a39f905c0037148194c71f09f2/background_task/signals.py#L6-L12

@tcely tcely marked this pull request as ready for review June 30, 2025 09:31
@tcely tcely moved this to Todo in Status Jun 30, 2025
@tcely tcely marked this pull request as draft June 30, 2025 18:39
@tcely tcely marked this pull request as ready for review July 1, 2025 02:20
@tcely tcely marked this pull request as draft July 1, 2025 02:21
@tcely tcely marked this pull request as ready for review July 1, 2025 18:25
@tcely tcely marked this pull request as draft July 1, 2025 18:26
@tcely tcely marked this pull request as ready for review July 1, 2025 20:53
@tcely tcely marked this pull request as draft July 1, 2025 21:10
@tcely tcely marked this pull request as ready for review July 2, 2025 02:19
@tcely tcely moved this from Todo to In Progress in Status Jul 2, 2025
@tcely tcely moved this from In Progress to Ready in Status Jul 2, 2025
@tcely tcely moved this from Ready to In Progress in Status Jul 2, 2025
@tcely tcely moved this from In Progress to Ready in Status Jul 2, 2025
@meeb meeb merged commit 59f7f16 into meeb:main Jul 3, 2025
6 checks passed
@github-project-automation github-project-automation bot moved this from Ready to Done in Status Jul 3, 2025
@tcely tcely deleted the patch-2 branch July 3, 2025 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants