potiuk commented on a change in pull request #6596: [AIRFLOW-6004] Untangle
Executors class to avoid cyclic imports
URL: https://github.com/apache/airflow/pull/6596#discussion_r352302856
##########
File path: airflow/executors/base_executor.py
##########
@@ -132,47 +151,64 @@ def heartbeat(self):
self.log.debug("Calling the %s sync method", self.__class__)
self.sync()
- def trigger_tasks(self, open_slots):
+ def trigger_tasks(self, open_slots: int) -> None:
"""
- Trigger tasks
+ Triggers tasks
:param open_slots: Number of open slots
- :return:
"""
sorted_queue = sorted(
[(k, v) for k, v in self.queued_tasks.items()],
key=lambda x: x[1][1],
reverse=True)
for _ in range(min((open_slots, len(self.queued_tasks)))):
- key, (command, _, queue, simple_ti) = sorted_queue.pop(0)
+ key, (command, _, _, simple_ti) = sorted_queue.pop(0)
self.queued_tasks.pop(key)
- self.running[key] = command
+ self.running.add(key)
self.execute_async(key=key,
command=command,
- queue=queue,
Review comment:
I re-added it.
----------------------------------------------------------------
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