Skip to content

Instantly share code, notes, and snippets.

@drogus
Created April 21, 2010 07:48
Show Gist options
  • Save drogus/373557 to your computer and use it in GitHub Desktop.
Save drogus/373557 to your computer and use it in GitHub Desktop.
Riddle::Client.connection_proc = Proc.new { |client|
config = ThinkingSphinx::Configuration.instance
controller = DaemonController.new(
:identifier => 'Sphinx search server',
:start_command => "#{config.bin_path}searchd --pidfile --config #{config.config_file}",
:before_start => Proc.new {},
:ping_command => lambda { TCPSocket.new(client.server, client.port) },
:pid_file => config.pid_file,
:log_file => config.searchd_log_file
)
controller.connect do
TCPSocket.new client.server, client.port
end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment