In our project, we decided to try to use the delayed_sidekiq strategy and encountered the following problems:
-
Create User records with the delayed_sidekiq strategy
Chewy.strategy(:delayed_sidekiq) { 3.times { |i| FactoryBot.create(:user, email: "delayed_sidekiq#{i}@mail.com") } }
The following error appears in the sidekiq logs:
[sidekiq#5788] Redis has deprecated the `zrangebyscore` command, called at ["/Users/r1zrei/.rvm/gems/ruby-2.7.2@product-x/gems/chewy-7.3.3/lib/chewy/ strategy/delayed_sidekiq/worker.rb:14:in `block in perform'"]
redis doc
I replaced this line lib/chewy/strategy/delayed_sidekiq/worker.rb:14 with
timechunk_keys = redis.zrange(timechunks_key, -1, score, byscore: true)
-
To store data we use a postgres database, where primary_key is in uuid format
lib/chewy/strategy/delayed_sidekiq/worker.rb:47 in this place the id is converted to integer, as a result, importing new index does not work
"d2ab25ce-3ec4-49f9-8e53-78665ac0a568".to_i # 0
UsersIndex.import 0
- Chewy 7.3.3
- Redis 6.2.5
- Elasticsearch 7.9.2
- Ruby 2.7.2
- Rails 6.1.7
- Sudekiq 7.2.0
In our project, we decided to try to use the
delayed_sidekiqstrategy and encountered the following problems:Create User records with the
delayed_sidekiqstrategyThe following error appears in the sidekiq logs:
redis doc
I replaced this line
lib/chewy/strategy/delayed_sidekiq/worker.rb:14withTo store data we use a postgres database, where primary_key is in uuid format
lib/chewy/strategy/delayed_sidekiq/worker.rb:47in this place the id is converted to integer, as a result, importing new index does not work