You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a set of ~20 daily jobs that connect to SFTP server and upload files there (a single file per job). Now, since this is all managed by Laravel horizon, the connection is not being closed after file upload is done and since server has limit for connections it ends up not allowing last jobs in the queue to upload their files. This happens because jobs that already uploaded their files and finished successfully have not closed their connection (disconnect function is being called in __destruct method of SSH2 class which is never being called in this case). So, i just need to close connection manually after a file is successfully uploaded.
Summary
Pls provide a way to disconnect from SFTP server on demand by either:
adding a disconnect function on SftpAdapter class
OR adding getConnectionProvider() method to SftpAdapter class and getConnection() method to SftpConnectionProvider class so that disconnect method can be called from there.
The text was updated successfully, but these errors were encountered:
Feature Request
Add ability to close SFTP connection manually
Scenario / Use-case
I have a set of ~20 daily jobs that connect to SFTP server and upload files there (a single file per job). Now, since this is all managed by Laravel horizon, the connection is not being closed after file upload is done and since server has limit for connections it ends up not allowing last jobs in the queue to upload their files. This happens because jobs that already uploaded their files and finished successfully have not closed their connection (disconnect function is being called in __destruct method of SSH2 class which is never being called in this case). So, i just need to close connection manually after a file is successfully uploaded.
Summary
Pls provide a way to disconnect from SFTP server on demand by either:
The text was updated successfully, but these errors were encountered: