Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Migrate Celery settings to new format with CELERY_ namespace#12622

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Copilot wants to merge2 commits intomain
base:main
Choose a base branch
Loading
fromcopilot/migrate-celery-settings

Conversation

Copy link
Contributor

CopilotAI commentedDec 1, 2025
edited
Loading

Celery 6.x will drop support for deprecated settings and require explicitCELERY namespace prefix. This migrates all settings to the new lowercase format.

Changes

  • worker.py: Addnamespace="CELERY" toconfig_from_object():

    application.config_from_object("django.conf:settings",namespace="CELERY")
  • Settings renamed (base.py, test.py, docker_compose.py):

    • CELERY_ALWAYS_EAGERCELERY_TASK_ALWAYS_EAGER
    • CELERYD_TASK_TIME_LIMITCELERY_TASK_TIME_LIMIT
    • CELERYD_HIJACK_ROOT_LOGGERCELERY_WORKER_HIJACK_ROOT_LOGGER
    • CELERYD_PREFETCH_MULTIPLIERCELERY_WORKER_PREFETCH_MULTIPLIER
    • CELERY_ACKS_LATECELERY_TASK_ACKS_LATE
    • CELERY_IGNORE_RESULTCELERY_TASK_IGNORE_RESULT
    • CELERY_CREATE_MISSING_QUEUESCELERY_TASK_CREATE_MISSING_QUEUES
    • CELERY_DEFAULT_QUEUECELERY_TASK_DEFAULT_QUEUE
    • CELERYBEAT_SCHEDULERCELERY_BEAT_SCHEDULER
    • CELERYBEAT_SCHEDULECELERY_BEAT_SCHEDULE
    • BROKER_URLCELERY_BROKER_URL
    • BROKER_TRANSPORT_OPTIONSCELERY_BROKER_TRANSPORT_OPTIONS
  • Code references updated:

    • core/utils/tasks/public.py:settings.CELERY_TASK_ALWAYS_EAGER
    • core/tasks.py:settings.CELERY_BROKER_URL

Refs:https://docs.celeryq.dev/en/stable/userguide/configuration.html#new-lowercase-settings

Original prompt

This section details on the original issue you should resolve

<issue_title>Migrate celery settings to new ones</issue_title>
<issue_description>Celery 6.x will drop support for some deprecated settings, and it will require to explicitly setCELERY as the prefix.

https://docs.celeryq.dev/en/stable/userguide/configuration.html#new-lowercase-settings

They do provide a tool for renaming the settings, but we should also check for settings set from the ops repos.

https://docs.celeryq.dev/en/stable/history/whatsnew-4.0.html#latentcall-django-admonition
</issue_description>

Comments on the Issue (you are@copilot in this section)

@humitosWe are already using `CELERY_` prefix in all our settings, so it seems we only need to update how we load them at https://github.com/readthedocs/readthedocs.org/blob/main/readthedocs/worker.py#L18
diff --git a/readthedocs/worker.py b/readthedocs/worker.pyindex 527ee509b..8a2de7dac 100644--- a/readthedocs/worker.py+++ b/readthedocs/worker.py@@ -15,7 +15,7 @@ def create_application():     )      application = Celery(settings.CELERY_APP_NAME)-    application.config_from_object("django.conf:settings")+    application.config_from_object("django.conf:settings", namespace='CELERY')     application.autodiscover_tasks(None)      # A step to initialize django-structlog

We need to do the same on commercial.

I put this in Q4, but I'm not surewhen Celery 6.x is going to be released. Maybe we can already make this change, tho.</comment_new>
<comment_new>@stsewd
We are using theCELERYD prefix for some settings</comment_new>


💬 We'd love your input! Share your thoughts on Copilot coding agent in our2 minute survey.

Co-authored-by: humitos <244656+humitos@users.noreply.github.com>
CopilotAI changed the title[WIP] Migrate celery settings to new configurationMigrate Celery settings to new format with CELERY_ namespaceDec 1, 2025
CopilotAI requested a review fromhumitosDecember 1, 2025 11:20
Copy link
Member

@humitoshumitos left a comment

Choose a reason for hiding this comment

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

Looks good after answering my question.

Also, we need to check the settings inhttps://github.com/readthedocs/readthedocs-ops andhttps://github.com/readthedocs/readthedocs-corporate-ops and migrate them as well. @copilot can you do that?

Copy link
ContributorAuthor

CopilotAI commentedDec 1, 2025

Looks good after answering my question.

Also, we need to check the settings inhttps://github.com/readthedocs/readthedocs-ops andhttps://github.com/readthedocs/readthedocs-corporate-ops and migrate ...

I can only work on the current repository (readthedocs.org). I don't have access to the readthedocs-ops and readthedocs-corporate-ops repositories. Someone with access to those repos will need to migrate the settings there using the same naming conventions from this PR.

@humitos
Copy link
Member

Also, we need to check the settings inreadthedocs/readthedocs-ops andreadthedocs/readthedocs-corporate-ops and migrate them as well.@copilot can you do that?

I checked in -ops repositories and opened:

@humitoshumitos marked this pull request as ready for reviewDecember 1, 2025 14:38
@humitoshumitos requested a review froma team as acode ownerDecember 1, 2025 14:38
@humitoshumitos requested review froma team andstsewdDecember 1, 2025 14:39
@humitos
Copy link
Member

We can merge this after today's deploy, so we have a full week to test it locally just in case.

@humitos
Copy link
Member

Well, we didn't merge this for this deploy, but that's fine. We don't want to deal with Celery issues during Xmas 😄 . I add this PR to one of the first sprints of 2026.

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

Reviewers

@stsewdstsewdstsewd approved these changes

+1 more reviewer

@humitoshumitoshumitos approved these changes

Reviewers whose approvals may not affect merge requirements

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Migrate celery settings to new ones

3 participants

@humitos@stsewd

[8]ページ先頭

©2009-2025 Movatter.jp