Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with thinkingsphinx index updates #239

Open
shoresh opened this issue Feb 18, 2024 · 0 comments
Open

Problems with thinkingsphinx index updates #239

shoresh opened this issue Feb 18, 2024 · 0 comments

Comments

@shoresh
Copy link

shoresh commented Feb 18, 2024

The thinkingsphinx gem is used to connect rails model with the sphinx search engine. We are using realtime indexes which require that a call be made when the data changes to update the index. We have placed that call in both the after_save method of the model as well as in the on_transition hook of the workflow engine:

  on_transition do |from, to, triggering_event, *event_args|
    unless from == to
      ThinkingSphinx::RealTime.callback_for(:scapp)
    end
  end

It looks like this callback is not working. If we change another column in the record the index is updated. In other words, the after_save hook is working. If we only change the status field in the record (through the workflow transition) the record is not updated. In this case we can see in the log that the index update occurs before the status is changed by the workflow engine. Do you have any advice for how to correct this problem? Are we doing something wrong?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant