If you don't have the time for a fork, please create a ticket so I won't forget about this, and add a link to this discussion.
http://github.com/freelancing-god/thinking-sphinx/issues Cheers -- Pat On 26/06/2010, at 6:14 PM, Pat Allan wrote: > Good idea to have a thinking_sphinx role - if you want to fork and patch, and > confirm it works for you, that'd be fantastic ;) > > -- > Pat > > On 24/06/2010, at 11:42 PM, Marcelo Barbudas wrote: > >> It's probably broken in those setups too, because they would be forced >> to run the recipes in db, app, and whatever. The only place it works >> is where people have just one server. >> >> In every recipe for capistrano out there you can see people >> using :app. Delayed_Job has great working recipes that use :app. >> >> At least allow people to setup a thinking_sphinx_role and use that. >> >> On Jun 24, 1:28 pm, Alex Tomlins <[email protected]> >> wrote: >>> Hi, >>> >>> Making that change would break things for people who run sphinx on the >>> database servers (or completely dedicated servers with a custom role). >>> >>> Personally I generally find it easier to roll my own deploy tasks that >>> look something like this: >>> >>> namespace :deploy do >>> namespace :sphinx do >>> before "deploy:restart", "deploy:sphinx:index_and_restart" >>> >>> desc "Reindexes and restarts sphinx in new release dir" >>> task :index_and_restart, :roles => :app do >>> run "cd #{current_path} && rake RAILS_ENV=#{rails_env} >>> thinking_sphinx:rebuild" >>> end >>> >>> desc "Re-generates indexes and signals sphinx to reload" >>> task :reindex, :roles => :app do >>> run "cd #{current_path} && rake RAILS_ENV=#{rails_env} >>> thinking_sphinx:reindex" >>> end >>> end >>> end >>> >>> The reindex one is only for convienience, the deploy only actually uses >>> the first one. I've found linking the db/sphinx directory to be >>> unnecessary as the database is regenerated on every deploy. >>> >>> hope that's helpful, >>> Alex >>> >>> On 24/06/2010 11:01, Marcelo Barbudas wrote: >>> >>> >>> >>> >>> >>>> Hi. >>> >>>> It seems the capistrano recipes are kindof old. I had two problems >>>> with them: >>> >>>> 1) Running something like >>>> task :after_update_code, :roles => [:app] do >>>> thinking_sphinx.configure >>>> end >>> >>>> Doesn't send :roles => [ :app ] to the underlying tasks. In my case TS >>>> was being executed on all roles, including DB servers, and everything >>>> crashed. >>> >>>> The proper fix is to include :roles => :app in the thinking_sphinx/lib/ >>>> deploy/capistrano.rb to each task. >>> >>>> 2) :after_update(as mentioned >>>> herehttp://freelancing-god.github.com/ts/en/deployment.html) >>>> apparently is deprecated >>> >>>> This is what I'm using: >>> >>>> task :sphinx_stop, :roles => [:app] do >>>> thinking_sphinx.stop >>>> end >>> >>>> task :sphinx_start, :roles => [:app] do >>>> symlink_sphinx_indexes >>>> thinking_sphinx.start >>>> end >>> >>>> task :symlink_sphinx_indexes, :roles => [:app] do >>>> run "ln -nfs #{shared_path}/db/sphinx #{current_path}/db/sphinx" >>>> end >>> >>>> before "deploy:update_code", "sphinx_stop" >>>> after "deploy:update_code", "sphinx_start" >>> >>>> -- >>>> M. >>> >>> -- >>> Alex Tomlins >>> Unboxed >>> Consulting >>> >>> E: [email protected] >>> <mailto:[email protected]> >>> M: +44 78 2469 6890 >>> T: +44 20 3137 2930 >>> F: +44 20 7183 4251 >>> >>> 8 Elder Street >>> London, E1 6BT >>> United Kingdomwww.unboxedconsulting.com<http://www.unboxedconsulting.com> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Thinking Sphinx" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/thinking-sphinx?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Thinking Sphinx" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/thinking-sphinx?hl=en. > -- You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
