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

Removed _modules #766

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions django_celery_beat/admin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Periodic Task Admin interface."""
from celery import current_app
from celery.utils import cached_property
from django import forms
from django.conf import settings
from django.contrib import admin, messages
Expand All @@ -23,7 +22,6 @@ class TaskSelectWidget(Select):
_choices = None

def tasks_as_choices(self):
_ = self._modules
tasks = list(sorted(name for name in self.celery_app.tasks
if not name.startswith('celery.')))
return (('', ''), ) + tuple(zip(tasks, tasks))
Expand All @@ -40,10 +38,6 @@ def choices(self, _):
# which would override ours.
pass

@cached_property
def _modules(self):
self.celery_app.loader.import_default_modules()


class TaskChoiceField(forms.ChoiceField):
"""Field that lets you choose between task names."""
Expand Down