jscheffl commented on code in PR #68115:
URL: https://github.com/apache/airflow/pull/68115#discussion_r3369283124
##########
providers/ssh/src/airflow/providers/ssh/triggers/ssh_remote_job.py:
##########
@@ -109,81 +133,75 @@ def _get_hook(self) -> SSHHookAsync:
host=self.remote_host,
)
- @tenacity.retry(
- stop=tenacity.stop_after_attempt(3),
- wait=tenacity.wait_exponential(multiplier=1, min=1, max=10),
- retry=tenacity.retry_if_exception_type((OSError, TimeoutError,
ConnectionError)),
- reraise=True,
- )
- async def _check_completion(self, hook: SSHHookAsync) -> int | None:
+ async def _connect(self) -> SSHClientConnection:
+ """Open a reusable asyncssh connection. Separated out as a seam for
testing."""
+ return await self._get_hook().get_conn()
Review Comment:
Would it make sense to pool the connections also for many triggerer jobs on
the same triggerer if expanded here?
--
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]