pat / ts-delayed-delta

Manage delta indexes via Delayed Job for Thinking Sphinx
http://ts.freelancing-gods.com
MIT License
73 stars 33 forks source link

ts-delayed-delta queues jobs even if TS is not running #35

Closed mipearson closed 11 years ago

mipearson commented 11 years ago

Hi,

I noticed that our tests were both running for longer and were including lots of indexer output in our TS3 branch.

Further investigation showed that in TS3, with ts-delayed-delta 2, the delta SphinxQL mode does not skip running creating the indexing job if updates_enabled? or deltas_enabled? are false.

I then also saw that TS3 doesn't implement these features.

How do you recommend I disable delayed job delta indexing when running in tests, for those tests that Sphinx is not otherwise running?

pat commented 11 years ago

This should do the trick, in your test setup: ThinkingSphinx::Deltas.suspend! (there's also the corresponding ThinkingSphinx::Deltas.resume!).

On 13/07/2013, at 9:33 PM, mipearson wrote:

Hi,

I noticed that our tests were both running for longer and were including lots of indexer output in our TS3 branch.

Further investigation showed that in TS3, with ts-delayed-delta 2, the delta SphinxQL mode does not skip running creating the indexing job if updates_enabled? or deltas_enabled? are false.

I then also saw that TS3 doesn't implement these features.

How do you recommend I disable delayed job delta indexing when running in tests, for those tests that Sphinx is not otherwise running?

— Reply to this email directly or view it on GitHub.

mipearson commented 11 years ago

Closing this as I've added stuff to the docs :)