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 2021/07/25 13:44:07 UTC

[GitHub] [airflow] Jorricks edited a comment on pull request #17207: WIP: Fix external_executor_id not being set for manually run jobs.

Jorricks edited a comment on pull request #17207:
URL: https://github.com/apache/airflow/pull/17207#issuecomment-886190622


   The other idea:
   > After every manually triggered task, we read the event_buffer and store that in the task instances.
   
   Would look something like adding this to the `def run()` of `class TaskInstanceModelView`:
   
   ```python3
               event_buffer = executor.get_event_buffer()
               for ti_key, (state, external_executor_id) in event_buffer.items():
                   if ti.key == ti_key and state == State.QUEUED:
                       session.merge(ti)
                       ti.external_executor_id = external_executor_id
                       session.commit()
                       updated = True
   ```


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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org