No, I don't. I remember reading something about that (but I can't find
it).

Here is the generate_alternatives method.

  def generate_alternatives # triggered through delayed_job
    self.alternatives.delete_all

    queue = xcombinations
    queue.each do |sections_for_alt|
      tmp = Alternative.new
      instrs = Array.new

      tmp.sections << sections_for_alt
      instrs = tmp.sections.map { |x| x.instructor }
      tmp.instructors << instrs.uniq
      self.alternatives << tmp
    end
    self.save
    self.update_attribute(:status, "done")
  end


What do you think I should do?

On Jul 16, 12:59 am, Jim Ruther Nill <[email protected]> wrote:
> do you validate the alternatives when you generate them using
> generate_alternatives?
>
>
>
>
>
> On Fri, Jul 16, 2010 at 12:38 PM, azolotov <[email protected]> wrote:
> > Gist
>
> > When I perform an action through the web interface, delta indexing
> > does not work. When I do it through script/console, it works
> > flawlessly. Regular indexing always works. This only happens in the
> > production environment on the EngineYard AppCloud.
>
> > More Details
>
> > I have a model called Schedule. When a user creates a new Schedule,
> > the method generate_alternatives is called on it after the Schedule is
> > saved. generate_alternatives computes different combinations of a set
> > of events and saves each combination as an Alternative. The
> > Alternative model is indexed. In short, Schedule :has_many
> > Alternatives & alternatives are generated by running
> > schedule.generate_alternatives.
>
> > When I create a Schedule through the app interface, Alternatives are
> > generated but not indexed. However, when I find a schedule through the
> > console and manually call the generate_alternatives action on it,
> > delta indexing works.
>
> > I looked at the nginx log files, production.log, searchd.log and
> > query.log, but nothing indicates that something is wrong. I could not
> > find any indication that it is a permission issue. I also set the bin
> > path for the production environment, again with no success.
>
> > The issue occurs on both nginx + mongrel and nginx + passenger.
>
> > I use chef to run the deployment. The related files are as follows:
>
> >http://github.com/azolotov/ey-cloud-recipes/blob/master/cookbooks/sph...
>
> >http://github.com/azolotov/ey-cloud-recipes/blob/master/cookbooks/sph...
>
> >http://github.com/azolotov/ey-cloud-recipes/blob/master/cookbooks/sph...
>
> > Do you have any suggestions that could help find the root of the
> > problem?
>
> > Thanks,
>
> > Anton
>
> > --
> > 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]<thinking-sphinx%2Bunsubscribe@ 
> > googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/thinking-sphinx?hl=en.
>
> --
> -------------------------------------------------------------
> visit my blog athttp://jimlabs.heroku.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.

Reply via email to