pierrejeambrun commented on code in PR #48239:
URL: https://github.com/apache/airflow/pull/48239#discussion_r2016477181
##########
task-sdk/src/airflow/sdk/execution_time/context.py:
##########
@@ -142,8 +143,10 @@ def _get_connection(conn_id: str) -> Connection:
from airflow.sdk.execution_time.comms import ErrorResponse, GetConnection
from airflow.sdk.execution_time.task_runner import SUPERVISOR_COMMS
- SUPERVISOR_COMMS.send_request(log=log, msg=GetConnection(conn_id=conn_id))
- msg = SUPERVISOR_COMMS.get_message()
+ with SUPERVISOR_COMMS.lock:
Review Comment:
Good idea, done to the 4 places. We might want to refactor that into a
method that can `read_write` => atomic_read_write and therefore the comment can
just be there and the lock to one place.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]