kaxil commented on a change in pull request #13247:
URL: https://github.com/apache/airflow/pull/13247#discussion_r567922385



##########
File path: airflow/cli/cli_parser.py
##########
@@ -58,9 +58,15 @@ class DefaultHelpParser(argparse.ArgumentParser):
     def _check_value(self, action, value):
         """Override _check_value and check conditionally added command"""
         executor = conf.get('core', 'EXECUTOR')
-        if value == 'celery' and executor not in (CELERY_EXECUTOR, 
CELERY_KUBERNETES_EXECUTOR):
-            message = f'celery subcommand works only with CeleryExecutor, your 
current executor: {executor}'
-            raise ArgumentError(action, message)
+        if value == 'celery':
+            if executor != CELERY_EXECUTOR:

Review comment:
       Yea that one feels too hacky, we should at least take care of it when 
running "airflow celery worker" (a less hacky --- so that users don't need to 
have a different configuration for the Celery Worker.
   
   Can you paste the full stack trace of the error please too -- want to see if 
I have seen that before




----------------------------------------------------------------
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.

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


Reply via email to