feluelle commented on a change in pull request #6596: [AIRFLOW-6004] Untangle
Executors class to avoid cyclic imports. Depends on [AIRFLOW-6010]
URL: https://github.com/apache/airflow/pull/6596#discussion_r350254871
##########
File path: airflow/executors/local_executor.py
##########
@@ -91,26 +91,31 @@ def execute_work(self, key: ExecutorKeyType,
command_to_run: CommandType):
class LocalWorker(LocalWorkerBase):
- """Local worker"""
+ """
+ Local worker that executes the task.
+
+ """
def __init__(self,
- result_queue: 'MultiprocessingQueue[Tuple[ExecutorKeyType,
str]]',
- key: ExecutorKeyType,
+ result_queue: 'MultiprocessingQueue[TaskInstanceState]',
+ key: TaskInstanceKey,
command_to_run: CommandType):
super().__init__(result_queue)
- self.key: ExecutorKeyType = key
+ self.key: TaskInstanceKey = key
self.command_to_run: CommandType = command_to_run
def run(self) -> None:
self.execute_work(key=self.key, command_to_run=self.command_to_run)
class QueuedLocalWorker(LocalWorkerBase):
- """LocalWorker implementation that is waiting for tasks from a queue and
will
- continue executing commands as they become available in the queue. It will
terminate
- execution once the poison token is found."""
+ """
+ LocalWorker implementation that is waiting for tasks from a queue and will
+ continue executing commands as they become available in the queue.
+
+ It will terminate execution once the poison token is found."""
Review comment:
Same here. And I think `"""` should be at a new line.
----------------------------------------------------------------
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