Skip to content

Commit

Permalink
Flower should be enabled for CeleryKubernetesExecutor (#13248)
Browse files Browse the repository at this point in the history
  • Loading branch information
dstandish authored Dec 22, 2020
1 parent c44092f commit d752d92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions airflow/cli/cli_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from airflow.cli.commands.legacy_commands import check_legacy_command
from airflow.configuration import conf
from airflow.exceptions import AirflowException
from airflow.executors import executor_constants
from airflow.executors.executor_constants import CELERY_EXECUTOR, CELERY_KUBERNETES_EXECUTOR
from airflow.utils.cli import ColorMode
from airflow.utils.helpers import partition
from airflow.utils.module_loading import import_string
Expand Down Expand Up @@ -58,7 +58,7 @@ 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 != executor_constants.CELERY_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 == 'kubernetes':
Expand Down

0 comments on commit d752d92

Please sign in to comment.