Thinking of migrating to Sidekiq with TS3
I feel that Sidekiq is the way to go in the future.
I have recently migrated to TS3.
What branch should I use?
https://github.com/danhawkins/ts-sidekiq-delta
https://github.com/pat/ts-resque-delta
Is it even possible to run FlyingSphinx + TS3 with Sidekiq? Or is it too early?
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Pat Allan on 18 Jan, 2013 12:04 AM
I've been using it over a month now with TS v3 on a production site (66k delta requests), and it works fine. You'll need to use the sidekiq branch of my ts-resque-delta fork though (the original ts-sidekiq-delta was forked from ts-resque-delta, hence Github got a bit confused with the naming):
2 Posted by lephyrius on 16 Mar, 2013 08:14 AM
I finally got time to transition to Sidekiq.
One question is:
So this is a branch of ResqueDelta.
In my delta arguement what should I use:
FlyingSphinx::ResqueDelta
or is there a:FlyingSphinx::SidekiqDelta
or should I use:ThinkingSphinx::Deltas::SidekiqDelta
Im moving from DelayedDelta. So this is a bit new to me.
Support Staff 3 Posted by Pat Allan on 16 Mar, 2013 09:15 AM
It's ThinkingSphinx::Deltas::SidekiqDelta. This will work locally and on Flying Sphinx.
4 Posted by lephyrius on 23 Mar, 2013 04:17 PM
I tried to to do it wtih this code:
Using sidekq 2.8.0 it work perfectly in local development but not at all for flying sphinx. It just contacts the flying sphinx server from the web server thread not running the sidekiq worker at all. It's like iits not being enqueued at all.Using Heroku.
5 Posted by luki3k5 on 10 Apr, 2013 12:46 PM
Hey Guys,
I've just hit the same problem, is there any new developments?
Cheers
Lukasz
Support Staff 6 Posted by Pat Allan on 10 Apr, 2013 03:35 PM
Hi Lukasz
Can you share your index definition here?
Cheers
Pat
7 Posted by Lukasz on 10 Apr, 2013 05:37 PM
Hi Pat,
Perhaps it makes sense to tell you what my plan is - I wish we could move away from delayed_job completely, so for now I am using sidekiq for everything else like images processing and emails. I wish I could drop this last worker of delayed_job that we use
for getting the delta indexes.
So after this small introduction here is the code, gem file and issue that keeps poping up:
Here is my gemfile:
I had some issues with running this locally first there was mysql2 gem missing (not sure if this will work on heroku) and now I have this one:
Thanks in advance!
Lukasz
8 Posted by Lukasz on 10 Apr, 2013 05:44 PM
Ahh I've just found this thread:
http://support.flying-sphinx.com/discussions/problems/482-sphinx-no...
Okay then, I will continue with this, since obviously I have the old index files.
Sorry for too hasty message.
Cheers
Lukasz
Support Staff 9 Posted by Pat Allan on 11 Apr, 2013 12:26 AM
Yeah, my fork of ts-sidekiq-delta is Thinking Sphinx v3 only.
If you hit any other problems, do let me know.
Cheers
Pat
10 Posted by Lukasz on 11 Apr, 2013 10:36 AM
Hey Pat,
I had some problems with installation and then indexing but following all the threads in support I managed to get over them, however now I hit the wall again and would appriciate any hint.
So here is my Issue:
and here is an index for Item class:
and here is how I used to use sphinx (prior update) and what I believe is now in a wrong way:
I have 'ThinkingSphinx::Configuration::Defaults::PANES << ThinkingSphinx::Panes::DistancePane
' setup inside the initializer but I don't think this has anything to do with it as if I understood documentation this pane gets auto-injected when 'geo' attribute is passed in.
Please let me know what am I missing, all hints are always greatly appreciated.
Best
Lukasz
Support Staff 11 Posted by Pat Allan on 11 Apr, 2013 02:49 PM
Hi Lukasz
The issue here is that SphinxQL just requires geodist, not @geodist - it's no longer a special attribute, but a generated one. If you remove the @ (and if you like, change it to the symbol (e.g.: :geodist) when using it in a filter), it should work fine.
Cheers
Pat
12 Posted by mauro on 11 Apr, 2013 07:11 PM
hi pat I just migrate TS 2 to TS3 as said in the readme but when I tried to run the rake for make config file i get his
13 Posted by Laurent Gorse on 19 Apr, 2013 02:18 AM
Hey everyone,
Joining in as this is the only conversation out there about TS3 + Sidekiq
I'm having an issue where when I create a model instance, the db rolls back right away with the error: 'undefined method 'toggle' for nil:NilClass'
I think this has to do with how the delta is declared when the model instance is created.
Here is the line that creates the instance:
@restaurant = Restaurant.find_or_create_by_google_id(venue[:google_id], final_restaurant_attributes(venue))
14 Posted by lephyrius on 25 Apr, 2013 04:43 PM
I have begun to get these warnings:
2013-04-25T16:36:34Z 5300 TID-ovs5uycmo WARN: ThinkingSphinx::Deltas::SidekiqDelta::DeltaJob - :timeout is unsafe and support has been removed from Sidekiq, see http://bit.ly/OtYpK for details 2013-04-25T16:36:34Z 5300 TID-ovs5uycmo WARN: ThinkingSphinx::Deltas::SidekiqDelta::FlagAsDeletedJob - :timeout is unsafe and support has been removed from Sidekiq, see http://bit.ly/OtYpK for details
Hmmm...This is probably just a problem with sidekiq deltas but I cannot report an issue on a branch.
Support Staff 15 Posted by Pat Allan on 28 Apr, 2013 05:29 PM
This is odd, as there's nothing in my fork of ts-sidekiq-delta that mentions timeouts. Do you have any other Sidekiq code in place (default settings of some sort) that sets timeouts?