mik-laj 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_r364697817
 
 

 ##########
 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:
   @ashb We need to store startup configuration information. TaskInstance and 
SimpleTaskInstance do not store type information. These objects are created in 
a completely different place and I would not like to mix classes. I like the 
principle of one responsibility. 
   
   What do you think about "QueueTaskInstance"? It sounds strange, but it makes 
sense in my opinion.
   TaskInstance -> Database entity.
   SimpleTaskInstance -> Picklable representation of TaskInstance. This It is 
used for communication between DagProcecssorAgent and Scheduler. 
   QueueTaskInstance -> TaskInstancec identifier with run configuration. This 
is used for "communication" between Executor and LocalTaskJob.
   
   I think the RawTaskDeferredRun class can be combined with TaskRunner. We do 
not need to have a class, because we immediately replace the object with a 
command. Does it make sense to you?
   
   CC: @nuclearpinguin 

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