File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ class CeleryConfig(BaseModel):
47
47
class AppConfig (BaseSettings ):
48
48
model_config = SettingsConfigDict (env_nested_delimiter = "__" )
49
49
50
+ APP_NAME : str = "bootstrap"
50
51
CELERY : CeleryConfig = CeleryConfig ()
51
52
DEBUG : bool = False
52
53
ENVIRONMENT : TYPE_ENVIRONMENT = "local"
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ def init_domains(config: AppConfig):
12
12
13
13
14
14
def init_celery (config : AppConfig ) -> Celery :
15
- celery_app = Celery ()
15
+ celery_app = Celery (f" { config . APP_NAME } -celery" )
16
16
celery_app .config_from_object (config .CELERY )
17
17
celery_app .autodiscover_tasks ()
18
18
Original file line number Diff line number Diff line change @@ -18,7 +18,10 @@ def create_app(
18
18
app_config = test_config or AppConfig ()
19
19
init_logger (app_config )
20
20
init_domains (app_config )
21
- app = FastAPI (debug = app_config .DEBUG )
21
+ app = FastAPI (
22
+ debug = app_config .DEBUG ,
23
+ title = app_config .APP_NAME ,
24
+ )
22
25
init_exception_handlers (app )
23
26
24
27
init_storage ()
You can’t perform that action at this time.
0 commit comments