Skip to content

Commit

Permalink
refactor:restructure project architecture
Browse files Browse the repository at this point in the history
Reorganized application package structure to improve modularity and navigability. Moved files from `fbr` to `app` directory and renamed key modules to better reflect functionality, such as `celery_worker`. Additionally, updated all relevant imports and settings configurations to align with the new structure, including Django settings and task management.
  • Loading branch information
hareshkainthdbt committed Dec 10, 2024
1 parent df980bb commit ef0935a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 34 deletions.
24 changes: 24 additions & 0 deletions fbr/celery_app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# isort:skip_file
# flake8: noqa

import os

from celery import Celery
from celery.schedules import crontab

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

from dbt_copilot_python.celery_health_check import healthcheck

celery_app = Celery("fbr_celery")
celery_app.config_from_object("django.conf:settings", namespace="CELERY")
celery_app.autodiscover_tasks()

celery_app = healthcheck.setup(celery_app)

celery_app.conf.beat_schedule = {
"schedule-fbr-cache-task": {
"task": "celery_worker.tasks.rebuild_cache",
"schedule": crontab(hour="1", minute="0"), # Runs daily at 1:00 AM
},
}
34 changes: 0 additions & 34 deletions fbr/config/celery.py

This file was deleted.

0 comments on commit ef0935a

Please sign in to comment.