Thinking Sphinx and Foreman

287 views
Skip to first unread message

Jay Zeschin

unread,
May 26, 2011, 5:06:21 PM5/26/11
to thinkin...@googlegroups.com
Not sure if anyone else out there is working with Foreman (https://github.com/ddollar/foreman) for managing processes in development or deployment, but we've been using it on a project lately and it's been quite handy for starting multiple processes in a single shot. The only downside is that it requires processes to run in the foreground, which is a bit tricky with Sphinx.

I put together a gist with a snippet from our Procfile as well as the rake task we needed to make Sphinx run in the foreground.  Ideally, it'd be awesome to turn this into one of the standard TS rake tasks, though it'd require some mucking around with Riddle::Controller to allow multiple strategies for invoking the searchd process programmatically.  Not quite sure the best way to structure that, but if anyone has a good idea I'm all ears.

Anyway, hopefully this is helpful to someone else.

Jay Zeschin

unread,
May 26, 2011, 5:08:10 PM5/26/11
to thinkin...@googlegroups.com
And realized that I forgot to actually link to the gist.  Whoops.

Pat Allan

unread,
May 28, 2011, 6:40:43 AM5/28/11
to thinkin...@googlegroups.com
Hi Jay

If you want to patch Riddle for this, that'd be fantastic. The controller index call accepts an options hash (you'll see :verbose in use), so perhaps something similar for the start call? Perhaps :nodetach => true could add the flag to the searchd request?

And then from there, adding a task to TS making use of that setting, plus what you've got with the fork call and signal trapping, would be easy enough too.

--
Pat

> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To post to this group, send email to thinkin...@googlegroups.com.
> To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.

Aaron Gibralter

unread,
Sep 5, 2011, 7:45:48 PM9/5/11
to thinkin...@googlegroups.com
Would this patch still be relevant?

Pat Allan

unread,
Sep 5, 2011, 7:57:45 PM9/5/11
to thinkin...@googlegroups.com
I'd certainly consider it if it was offered.

--
Pat

On 06/09/2011, at 9:45 AM, Aaron Gibralter wrote:

> Would this patch still be relevant?
>

> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.

> To view this discussion on the web visit https://groups.google.com/d/msg/thinking-sphinx/-/rQ7qf9asg-4J.

Aaron Gibralter

unread,
Sep 6, 2011, 1:58:27 AM9/6/11
to thinkin...@googlegroups.com
Well this one is pretty small and simple: https://github.com/freelancing-god/riddle/pull/38

I guess the other part is in thinking-sphinx's rake tasks...

Aaron Gibralter

unread,
Sep 6, 2011, 2:35:27 AM9/6/11
to thinkin...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages