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



##########
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:
       ```suggestion
       cls.validate_command(command_to_exec)
   ```
   
   that should work 🤷  - WDYT ?

##########
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:
       Oh yes, sry didnt realize it was not a part of the class




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