turbaszek commented on a change in pull request #10033:
URL: https://github.com/apache/airflow/pull/10033#discussion_r461519798
##########
File path: airflow/executors/celery_executor.py
##########
@@ -71,9 +71,7 @@
@app.task
def execute_command(command_to_exec: CommandType) -> None:
"""Executes command."""
- if command_to_exec[0:3] != ["airflow", "tasks", "run"]:
- raise ValueError('The command must start with ["airflow", "tasks",
"run"].')
-
+ BaseExecutor.validate_command(command_to_exec)
Review comment:
I think the `cls` will be undefined in this place
##########
File path: airflow/executors/celery_executor.py
##########
@@ -71,9 +71,7 @@
@app.task
def execute_command(command_to_exec: CommandType) -> None:
"""Executes command."""
- if command_to_exec[0:3] != ["airflow", "tasks", "run"]:
- raise ValueError('The command must start with ["airflow", "tasks",
"run"].')
-
+ BaseExecutor.validate_command(command_to_exec)
Review comment:
But I updated other usages to `self.` instead of `BaseExecutor.`
----------------------------------------------------------------
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]