File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ class TaskProcessorAppConfig(AppConfig):
1010 name = "task_processor"
1111
1212 def ready (self ) -> None :
13+ if settings .TASK_RUN_METHOD != TaskRunMethod .TASK_PROCESSOR :
14+ return
15+
1316 self ._validate_database_settings ()
1417 self ._register_health_check ()
1518
@@ -20,9 +23,6 @@ def _register_health_check(self) -> None:
2023 if not settings .ENABLE_TASK_PROCESSOR_HEALTH_CHECK :
2124 return
2225
23- if settings .TASK_RUN_METHOD != TaskRunMethod .TASK_PROCESSOR :
24- return
25-
2626 from .health import TaskProcessorHealthCheckBackend
2727
2828 plugin_dir .register (TaskProcessorHealthCheckBackend )
@@ -31,9 +31,6 @@ def _validate_database_settings(self) -> None:
3131 """
3232 Validate that multi-database is setup correctly
3333 """
34- if settings .TASK_RUN_METHOD != TaskRunMethod .TASK_PROCESSOR :
35- return
36-
3734 if "task_processor" not in settings .TASK_PROCESSOR_DATABASES :
3835 return # Not using a separate database
3936
You can’t perform that action at this time.
0 commit comments