Skip to content

Commit

Permalink
Remove 2.8 version check from CeleryExecutor CLI (#46910)
Browse files Browse the repository at this point in the history
We now support only 2.9+ with providers.
  • Loading branch information
jedcunningham authored Feb 19, 2025
1 parent 0adb5ad commit 319cf30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
from airflow.configuration import conf
from airflow.exceptions import AirflowProviderDeprecationWarning, AirflowTaskTimeout
from airflow.executors.base_executor import BaseExecutor
from airflow.providers.celery.version_compat import AIRFLOW_V_2_8_PLUS, AIRFLOW_V_3_0_PLUS
from airflow.providers.celery.version_compat import AIRFLOW_V_3_0_PLUS
from airflow.stats import Stats
from airflow.utils.state import TaskInstanceState
from celery import states as celery_states
Expand Down Expand Up @@ -158,10 +158,7 @@ def __getattr__(name):
action="store_true",
)

if AIRFLOW_V_2_8_PLUS:
CELERY_CLI_COMMAND_PATH = "airflow.providers.celery.cli.celery_command"
else:
CELERY_CLI_COMMAND_PATH = "airflow.cli.commands.celery_command"
CELERY_CLI_COMMAND_PATH = "airflow.providers.celery.cli.celery_command"

CELERY_COMMANDS = (
ActionCommand(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ def get_base_airflow_version_tuple() -> tuple[int, int, int]:
return airflow_version.major, airflow_version.minor, airflow_version.micro


AIRFLOW_V_2_8_PLUS = get_base_airflow_version_tuple() >= (2, 8, 0)
AIRFLOW_V_3_0_PLUS = get_base_airflow_version_tuple() >= (3, 0, 0)

0 comments on commit 319cf30

Please sign in to comment.