ashb commented on a change in pull request #7085: [AIRFLOW-6334] Use classes 
instead list of string in executors
URL: https://github.com/apache/airflow/pull/7085#discussion_r364657264
 
 

 ##########
 File path: airflow/executors/base_executor.py
 ##########
 @@ -232,14 +255,14 @@ def get_event_buffer(self, dag_ids=None) -> 
Dict[TaskInstanceKeyType, Optional[s
 
     def execute_async(self,
                       key: TaskInstanceKeyType,
-                      command: CommandType,
+                      deferred_run: LocalTaskJobDeferredRun,
                       queue: Optional[str] = None,
 
 Review comment:
   @mik-laj Here's an idea: do we actually need a whole new class, or could we 
instead do something like `executor.execute_async(task_instance)`?
   
   Since the job of the executor is to run execute tasks, not run arbitrary 
commands, why not just pass it the entire TI object and let the executor work 
out what it needs to do. Thinking about it now passing down a command to 
`airflow run `/`airflow tasks run` instead of the TI itself feels like a very 
leaky abstraction.

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


With regards,
Apache Git Services

Reply via email to