Skip to content

Commit

Permalink
Merge pull request #82 from uktrade/feature/resolve-celery
Browse files Browse the repository at this point in the history
refactor:module paths and refine Celery configuration.
  • Loading branch information
hareshkainthdbt authored Dec 6, 2024
2 parents 1dde439 + c1da261 commit b291105
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fbr/cache/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from fbr.search.utils.documents import clear_all_documents


@shared_task(bind=True, max_retries=3)
@shared_task
def rebuild_cache():
try:
start = time.time()
Expand Down
4 changes: 2 additions & 2 deletions fbr/config/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
from celery.schedules import crontab
from dbt_copilot_python.celery_health_check import healthcheck

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "fbr.config.settings.local")

celery_app = Celery("fbr_celery")

celery_app.config_from_object("django.conf:settings", namespace="CELERY")
celery_app.config_from_object("fbr.config.settings.local", namespace="CELERY")

celery_app.autodiscover_tasks()

Expand Down
2 changes: 1 addition & 1 deletion fbr/config/settings/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
BASE_APPS = [
"whitenoise.runserver_nostatic", # Serve static files via WhiteNoise
"rest_framework",
"fbr.cache",
"cache",
]

# REST_FRAMEWORK = {
Expand Down

0 comments on commit b291105

Please sign in to comment.