dazza-codes 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_r363898046
 
 

 ##########
 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:
   nit: the number of concepts in the name for `LocalTaskJobDeferredRun` begs 
so many questions about what the hec that thing is and how the whole OOP design 
is evolving such that complex combinations of so many concepts is necessary in 
this class name.  e.g. why is it not simple `DeferredTask` or `LocalTask` or 
`QueuedTask` (and `Queued` implies `DeferredRun`) and what's the difference 
between `Task` and `Job` and why does this one class capture both concepts at 
the same time?  The method-name uses `async` while the param and the class name 
of the param uses `deferred` and the method itself calls on `queue` methods, so 
there's lots of similar concepts involved here and if the public API is 
changing anyway it could be an opportunity to review and clarify the terms 
used.  (Of course, happy to take this nit-pick offline where I might get 
educated about all the things that make this complex combination of concepts 
necessary.  Also, I understand these questions imply some kind of scope creep 
for this PR and, well, yea, sorry about that.)

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