You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/04/30 09:00:42 UTC

[GitHub] [airflow] ashb commented on a change in pull request #8624: Profile hostname for celery executor (#8619)

ashb commented on a change in pull request #8624:
URL: https://github.com/apache/airflow/pull/8624#discussion_r417860289



##########
File path: airflow/executors/base_executor.py
##########
@@ -58,7 +58,7 @@ def __init__(self, parallelism: int = PARALLELISM):
         self.queued_tasks: OrderedDict[TaskInstanceKeyType, QueuedTaskInstanceType] \
             = OrderedDict()
         self.running: Set[TaskInstanceKeyType] = set()
-        self.event_buffer: Dict[TaskInstanceKeyType, Optional[str]] = {}
+        self.event_buffer: Dict[TaskInstanceKeyType, Tuple[Optional[str], Any]] = {}

Review comment:
       `Any` doesn't feel like the right type.
   
   Additionally rather than using a tuple it would be "clearer" if you created a custom type like we did for `TaskInstanceKeyType`

##########
File path: airflow/executors/base_executor.py
##########
@@ -58,7 +58,7 @@ def __init__(self, parallelism: int = PARALLELISM):
         self.queued_tasks: OrderedDict[TaskInstanceKeyType, QueuedTaskInstanceType] \
             = OrderedDict()
         self.running: Set[TaskInstanceKeyType] = set()
-        self.event_buffer: Dict[TaskInstanceKeyType, Optional[str]] = {}
+        self.event_buffer: Dict[TaskInstanceKeyType, Tuple[Optional[str], Any]] = {}

Review comment:
       Oh, because this is in the BaseExecutor. Hmmmmmm.




----------------------------------------------------------------
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:
users@infra.apache.org