Optimize the naming of setting params (#410)

This commit is contained in:
Wu Clan
2024-09-09 11:50:22 +08:00
committed by GitHub
parent 9aa2d7b593
commit b13410c7d1
14 changed files with 96 additions and 97 deletions
+1
View File
@@ -54,6 +54,7 @@ class TaskSettings(BaseSettings):
}
@model_validator(mode='before')
@classmethod
def validate_celery_broker(cls, values):
if values['ENVIRONMENT'] == 'pro':
values['CELERY_BROKER'] = 'rabbitmq'