dheerajturaga commented on code in PR #60675:
URL: https://github.com/apache/airflow/pull/60675#discussion_r2744596079


##########
providers/celery/src/airflow/providers/celery/cli/celery_command.py:
##########
@@ -189,8 +189,32 @@ def filter(self, record):
 @_providers_configuration_loaded
 def worker(args):
     """Start Airflow Celery worker."""
-    # This needs to be imported locally to not trigger Providers Manager 
initialization
-    from airflow.providers.celery.executors.celery_executor import app as 
celery_app
+    team_config = None
+    if hasattr(args, "team") and args.team:
+        # Multi-team is enabled, create team-specific Celery app and use team 
based config
+        # This requires Airflow 3.2+, and core.multi_team config to be true to 
be enabled.
+        if not AIRFLOW_V_3_2_PLUS:
+            raise AirflowConfigException(

Review Comment:
   Can we raise SystemExit instead, that way we are aligned with the other 
SystemExit exceptions thrown for other missing arguments? Current approach 
throws a stack trace which can be confusing to the user.
   
   ```suggestion
               raise SystemExit(
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to