fixed comments
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,6 @@
|
||||
# core/celery_app.py
|
||||
from celery import Celery
|
||||
from core.config import settings # Import your settings
|
||||
|
||||
from core.config import settings
|
||||
celery_app = Celery(
|
||||
"worker",
|
||||
broker=settings.REDIS_URL,
|
||||
@@ -9,9 +8,5 @@ celery_app = Celery(
|
||||
include=[
|
||||
"modules.auth.tasks",
|
||||
"modules.admin.tasks",
|
||||
], # Add paths to modules containing tasks
|
||||
# Add other modules with tasks here, e.g., "modules.some_other_module.tasks"
|
||||
)
|
||||
|
||||
# Optional: Update Celery configuration directly if needed
|
||||
# celery_app.conf.update(task_track_started=True)
|
||||
],
|
||||
)
|
||||
@@ -20,7 +20,7 @@ class Settings(BaseSettings):
|
||||
JWT_SECRET_KEY: str
|
||||
|
||||
# Other settings
|
||||
GOOGLE_API_KEY: str = "" # Example with a default
|
||||
GOOGLE_API_KEY: str
|
||||
|
||||
class Config:
|
||||
# Tell pydantic-settings to load variables from a .env file
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# core/database.py
|
||||
from sqlalchemy import create_engine
|
||||
from sqlalchemy.orm import sessionmaker, Session, declarative_base
|
||||
from typing import Generator
|
||||
@@ -13,7 +12,7 @@ _SessionLocal = None
|
||||
|
||||
def get_engine():
|
||||
global _engine
|
||||
if _engine is None:
|
||||
if (_engine is None):
|
||||
if not settings.DB_URL:
|
||||
raise ValueError("DB_URL is not set in Settings.")
|
||||
print(f"Connecting to database at {settings.DB_URL}")
|
||||
|
||||
Reference in New Issue
Block a user