Skip to content
This repository was archived by the owner on Mar 28, 2025. It is now read-only.

fix: tasks app modules not autodiscovered #27

Merged
merged 1 commit into from
Mar 11, 2025
Merged
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
3 changes: 3 additions & 0 deletions task_processor/management/commands/runprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from argparse import ArgumentParser

from django.core.management import BaseCommand
from django.utils.module_loading import autodiscover_modules
from gunicorn.config import Config

from task_processor.threads import TaskRunner, TaskRunnerCoordinator
Expand Down Expand Up @@ -60,6 +61,8 @@ def handle(self, *args, **options):

logger.debug("Config: %s", config)

autodiscover_modules("tasks")
Copy link
Contributor

Choose a reason for hiding this comment

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

Huh, I hadn't seen this utility function before. Neat.


coordinator = TaskRunnerCoordinator(config=config)
coordinator.start()

Expand Down