Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add periodic_task_name in favor of celery/django-celery-results#261 #477

Merged
merged 3 commits into from
Dec 17, 2021

Conversation

lvelvee
Copy link

@lvelvee lvelvee commented Dec 15, 2021

celery/django-celery-results#261

Now you can store PeriodicTask.name to django-celery-results (TaskResult.periodic_task_name).

Suppose we have two periodic tasks, their schedules are different, but the tasks are the same.

name task args schedule
schedule1 some.celery.task (1,) every hour
schedule2 some.celery.task (2,) every 2 hours

Now you can distinguish the source of the task from the results by the periodic_task_name field.

id task_name periodic_task_name
uuid1 some.celery.task schedule1
uuid2 some.celery.task schedule1
uuid3 some.celery.task schedule2
uuid4 some.celery.task schedule2

celery beat will add PeriodicTask.name to requests when scheduled by database or manually scheduled by admin panel.

@lvelvee lvelvee changed the title feat: add periodic_task_name in favor of https://github.com/celery/django-celery-results/pull/261 feat: add periodic_task_name in favor of celery/django-celery-results#261 Dec 15, 2021
-----------------------------------

Now you can store PeriodicTask.name to django-celery-results (TaskResult.periodic_task_name).
(more details here: https://github.com/celery/django-celery-beat/pull/477, https://github.com/celery/django-celery-results/pull/261)
Copy link
Member

Choose a reason for hiding this comment

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

i think we should add more text and example with the links provided

Copy link
Author

Choose a reason for hiding this comment

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

added, but i'm not familiar with .rst files, may you help to check it?

Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

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

thats good work. thanks

@auvipy auvipy merged commit 77a6ccf into celery:master Dec 17, 2021
@lvelvee lvelvee deleted the feat-periodic-task-name branch December 17, 2021 08:02
@auvipy auvipy added this to the v2.3.0 milestone Jan 3, 2022
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.

2 participants