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 2022/12/21 11:00:10 UTC

[GitHub] [airflow] ashb commented on a diff in pull request #27758: WIP - Enable trigger logging in webserver

ashb commented on code in PR #27758:
URL: https://github.com/apache/airflow/pull/27758#discussion_r1054258485


##########
airflow/jobs/triggerer_job.py:
##########
@@ -368,8 +518,18 @@ async def run_trigger(self, trigger_id, trigger):
             # allow triggers a chance to cleanup, either in that case or if
             # they exit cleanly.
             trigger.cleanup()
+            self.close_handler(trigger)
 
-    # Main-thread sync API
+            # unsetting ctx_indiv_trigger var restores stdout logging
+            ctx_indiv_trigger.set(None)

Review Comment:
   Rather thatn `set(None)` should we use https://docs.python.org/3/library/contextvars.html#contextvars.ContextVar.reset?



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