dabla commented on code in PR #65480:
URL: https://github.com/apache/airflow/pull/65480#discussion_r3292356389
##########
providers/sftp/src/airflow/providers/sftp/hooks/sftp.py:
##########
@@ -1040,3 +1109,30 @@ async def get_mod_time(self, path: str) -> str: # type:
ignore[return]
return mod_time
except asyncssh.SFTPNoSuchFile:
raise AirflowException("No files matching")
+
+ async def transfer(
+ self,
+ operation: str,
+ local_filepath: str | list[str] | None,
+ remote_filepath: str | list[str],
+ confirm: bool = True,
+ create_intermediate_dirs: bool = False,
+ concurrency: int = 1,
+ prefetch: bool = True,
+ ) -> None:
+ import asyncio
Review Comment:
Wondering if asgiref sync_to_async would n’t be a better solution?
--
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]