Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
転送とrubyNet/ SFTPライブラリの接続を制限する方法はありますか?これを利用して、夜間にいくつかのバックアップをダウンロードしたいのですが、そうしている間、サーバーの帯域幅をすべて使い果たしたくありません。
Net::SFTPドキュメントからのこのサンプルを検討してください。
# open and read from a pseudo-IO for a remote file sftp.file.open("/path/to/remote", "r") do |f| puts f.gets end
sleepそのブロックの中に入れるとどうなりますか?
sleep