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

Fixes "NoMethodError: undefined method `connection' for #<ThinkingSphinx::Configuration:0x007fdb75d89c78>" #30

Closed iHiD closed 11 years ago

iHiD commented 11 years ago

With TS 3.0.1 and ts-delayed-delta edge, I get the following error when running a FlagAsDeletedJob:

NoMethodError: undefined methodconnection' for #ThinkingSphinx::Configuration:0x007fdb75d89c78`

This fixes it. I have no idea if it does it in the way that you want it to do it, and am happy to change it if you tell me how you'd prefer it. Equally, there seem to be no real tests on edge so I've not included any. If you tell me how you'd like them, I'm happy to write them too :)

Thanks for all your hard work with TS. iHiD

pat commented 11 years ago

Thanks for the patch Jeremy. It's better to use ThinkingSphinx::Connection.take, which yields a connection from the pool - thus, re-use when possible, instead of the overhead of starting a new connection each time. If you'd like to make that change, I'll get this merged in pronto :)

iHiD commented 11 years ago

Sweet. Done. Cheers, @pat!

pat commented 11 years ago

Merged :)

iHiD commented 11 years ago

Awesome. Upgrading to TS3 today - much prefer having the definitions in indicies files. Great work! :)

On Fri, Feb 22, 2013 at 11:36 PM, Pat Allan notifications@github.comwrote:

Merged :)

— Reply to this email directly or view it on GitHubhttps://github.com/pat/ts-delayed-delta/pull/30#issuecomment-13979648.