Forum: Ruby on Rails switchtower and scgi

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
1f0d5b7027dec052d6fcf6ecbc24e811?d=identicon&s=25 mje113 (Guest)
on 2005-11-12 12:49
(Received via mailing list)
Has anyone figured out a proper way to get switchtower and SCGI to
work together nicely?

Thanks,
Mike
A78fabe22aa7df17f05cb02e622e20a7?d=identicon&s=25 jerrett (Guest)
on 2005-11-12 12:49
(Received via mailing list)
it would work if the params to specify a path worked correctly, and if
you could pass a password (assuming you are not on a shared box).. both
of which i believe zed is working on

in the meantime you can manually start it, and use switchtower to issue
a HUP signal to gracefully restart it
1f0d5b7027dec052d6fcf6ecbc24e811?d=identicon&s=25 mje113 (Guest)
on 2005-11-12 12:49
(Received via mailing list)
On 11/8/05, Jerrett Taylor <jerrett@bravenet.com> wrote:
> it would work if the params to specify a path worked correctly, and if
> you could pass a password (assuming you are not on a shared box).. both
> of which i believe zed is working on
>
> in the meantime you can manually start it, and use switchtower to issue
> a HUP signal to gracefully restart it
>

Actually, I managed to figure out a workable solution:

desc "Restart SCGI"
task :restart, :roles => :app do
  run "cd #{current_path} && scgi_ctrl restart" do |channel, stream,
data|
    if data =~ /^Password:/
      logger.info "#{channel[:host]} asked for password"
      channel.send_data "mypassword\n"
    end
  end
end

The only problem is, it always seems to fire off the last version of
the application... does anyone know if updating the symlink occurs
after the restart?  I guess that would be odd.

m
This topic is locked and can not be replied to.