diff --git a/CHANGELOG b/CHANGELOG index f828eb10..f1f66595 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ *0.11.0* *SVN* +* Add Actor#connect! method for working around lazy connection establishing + * Make sure IO::TRUNC is specified for Net::SFTP uploads (#3510) * Add branch support to CVS [jeremy@hinegardner.org] (#3596) diff --git a/lib/switchtower/actor.rb b/lib/switchtower/actor.rb index 61c61e70..35a6dfdc 100644 --- a/lib/switchtower/actor.rb +++ b/lib/switchtower/actor.rb @@ -326,6 +326,14 @@ module SwitchTower self.class.default_io_proc end + # Used to force connections to be made to the current task's servers. + # Connections are normally made lazily in SwitchTower--you can use this + # to force them open before performing some operation that might be + # time-sensitive. + def connect!(options={}) + execute_on_servers(options) { } + end + def metaclass class << self; self; end end