|
|
|
@ -209,7 +209,6 @@ class DatabaseConfig(BaseSettings):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CeleryConfig(DatabaseConfig):
|
|
|
|
class CeleryConfig(DatabaseConfig):
|
|
|
|
|
|
|
|
|
|
|
|
CELERY_BACKEND: str = Field(
|
|
|
|
CELERY_BACKEND: str = Field(
|
|
|
|
description="Backend for Celery task results. Options: 'database', 'redis'.",
|
|
|
|
description="Backend for Celery task results. Options: 'database', 'redis'.",
|
|
|
|
default="redis",
|
|
|
|
default="redis",
|
|
|
|
@ -241,7 +240,6 @@ class CeleryConfig(DatabaseConfig):
|
|
|
|
|
|
|
|
|
|
|
|
@computed_field
|
|
|
|
@computed_field
|
|
|
|
def CELERY_RESULT_BACKEND(self) -> str | None:
|
|
|
|
def CELERY_RESULT_BACKEND(self) -> str | None:
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
"db+{}".format(self.SQLALCHEMY_DATABASE_URI)
|
|
|
|
"db+{}".format(self.SQLALCHEMY_DATABASE_URI)
|
|
|
|
if self.CELERY_BACKEND == "database"
|
|
|
|
if self.CELERY_BACKEND == "database"
|
|
|
|
|