Comments (5)
Oh I see. I'll update the wiki and here asap with the v7 method. I hadn't updated the docs because v7 was still brand new and forgot about it.
from sidekiq.
Sidekiq does not use the Redis gem in 7, it only uses redis-client. Can you tell me what redis_info is returning?
from sidekiq.
So redis_info
works fine with redis-client
but I get a different error:
NoMethodError: undefined method `mget' for #<RedisClient redis://localhost:6379> (NoMethodError)
conn.mget(keys).each_with_index do |value, idx|
^^^^^
/Users/bryanp/.gem/ruby/3.2.2/gems/sidekiq-7.2.4/lib/sidekiq/api.rb:205:in `block in date_stat_hash'
/Users/bryanp/.gem/ruby/3.2.2/gems/sidekiq-7.2.4/lib/sidekiq/config.rb:163:in `block in redis'
/Users/bryanp/.gem/ruby/3.2.2/gems/redis-client-0.22.1/lib/redis_client/pooled.rb:30:in `block in with'
/Users/bryanp/.gem/ruby/3.2.2/gems/connection_pool-2.4.1/lib/connection_pool.rb:110:in `block (2 levels) in with'
/Users/bryanp/.gem/ruby/3.2.2/gems/connection_pool-2.4.1/lib/connection_pool.rb:109:in `handle_interrupt'
/Users/bryanp/.gem/ruby/3.2.2/gems/connection_pool-2.4.1/lib/connection_pool.rb:109:in `block in with'
/Users/bryanp/.gem/ruby/3.2.2/gems/connection_pool-2.4.1/lib/connection_pool.rb:106:in `handle_interrupt'
/Users/bryanp/.gem/ruby/3.2.2/gems/connection_pool-2.4.1/lib/connection_pool.rb:106:in `with'
/Users/bryanp/.gem/ruby/3.2.2/gems/redis-client-0.22.1/lib/redis_client/pooled.rb:26:in `with'
/Users/bryanp/.gem/ruby/3.2.2/gems/sidekiq-7.2.4/lib/sidekiq/config.rb:160:in `redis'
/Users/bryanp/.gem/ruby/3.2.2/gems/sidekiq-7.2.4/lib/sidekiq.rb:73:in `redis'
/Users/bryanp/.gem/ruby/3.2.2/gems/sidekiq-7.2.4/lib/sidekiq/api.rb:204:in `date_stat_hash'
/Users/bryanp/.gem/ruby/3.2.2/gems/sidekiq-7.2.4/lib/sidekiq/api.rb:187:in `processed'
/Users/bryanp/.gem/ruby/3.2.2/gems/sidekiq-7.2.4/lib/sidekiq/web/application.rb:63:in `block in <class:WebApplication>'
/Users/bryanp/.gem/ruby/3.2.2/gems/sidekiq-7.2.4/lib/sidekiq/web/application.rb:416:in `instance_exec'
/Users/bryanp/.gem/ruby/3.2.2/gems/sidekiq-7.2.4/lib/sidekiq/web/application.rb:416:in `block in call'
/Users/bryanp/.gem/ruby/3.2.2/gems/sidekiq-7.2.4/lib/sidekiq/web/application.rb:414:in `catch'
/Users/bryanp/.gem/ruby/3.2.2/gems/sidekiq-7.2.4/lib/sidekiq/web/application.rb:414:in `call'
/Users/bryanp/.gem/ruby/3.2.2/gems/sidekiq-7.2.4/lib/sidekiq/web/csrf_protection.rb:51:in `admit'
/Users/bryanp/.gem/ruby/3.2.2/gems/sidekiq-7.2.4/lib/sidekiq/web/csrf_protection.rb:40:in `call'
/Users/bryanp/.gem/ruby/3.2.2/gems/rack-3.0.11/lib/rack/static.rb:161:in `call'
/Users/bryanp/.gem/ruby/3.2.2/gems/rack-3.0.11/lib/rack/builder.rb:264:in `call'
/Users/bryanp/.gem/ruby/3.2.2/gems/sidekiq-7.2.4/lib/sidekiq/web.rb:117:in `call'
/Users/bryanp/.gem/ruby/3.2.2/gems/sidekiq-7.2.4/lib/sidekiq/web.rb:122:in `call'
/Users/bryanp/.gem/ruby/3.2.2/gems/rack-3.0.11/lib/rack/urlmap.rb:76:in `block in call'
/Users/bryanp/.gem/ruby/3.2.2/gems/rack-3.0.11/lib/rack/urlmap.rb:60:in `each'
/Users/bryanp/.gem/ruby/3.2.2/gems/rack-3.0.11/lib/rack/urlmap.rb:60:in `call'
/Users/bryanp/.gem/ruby/3.2.2/gems/rack-session-2.0.0/lib/rack/session/abstract/id.rb:272:in `context'
/Users/bryanp/.gem/ruby/3.2.2/gems/rack-session-2.0.0/lib/rack/session/abstract/id.rb:266:in `call'
/Users/bryanp/.gem/ruby/3.2.2/gems/rack-3.0.11/lib/rack/tempfile_reaper.rb:20:in `call'
/Users/bryanp/.gem/ruby/3.2.2/gems/rack-3.0.11/lib/rack/lint.rb:63:in `response'
/Users/bryanp/.gem/ruby/3.2.2/gems/rack-3.0.11/lib/rack/lint.rb:35:in `call'
/Users/bryanp/.gem/ruby/3.2.2/gems/rack-3.0.11/lib/rack/show_exceptions.rb:27:in `call'
/Users/bryanp/.gem/ruby/3.2.2/gems/rack-3.0.11/lib/rack/common_logger.rb:43:in `call'
/Users/bryanp/.gem/ruby/3.2.2/gems/rack-3.0.11/lib/rack/content_length.rb:20:in `call'
/Users/bryanp/.gem/ruby/3.2.2/gems/rackup-2.1.0/lib/rackup/handler/webrick.rb:111:in `service'
/Users/bryanp/.gem/ruby/3.2.2/gems/webrick-1.8.1/lib/webrick/httpserver.rb:140:in `service'
/Users/bryanp/.gem/ruby/3.2.2/gems/webrick-1.8.1/lib/webrick/httpserver.rb:96:in `run'
/Users/bryanp/.gem/ruby/3.2.2/gems/webrick-1.8.1/lib/webrick/server.rb:310:in `block in start_thread'
Here's the new code:
require "rack"
require "sidekiq-pro"
require "sidekiq/pro/web"
require "securerandom"
require "rack/urlmap"
require "rack/session"
require "redis-client"
POOL1 = RedisClient.config(url: "redis://localhost:6379/0").new_pool
POOL2 = RedisClient.config(url: "redis://localhost:6379/1").new_pool
use Rack::Session::Cookie, secret: SecureRandom.hex(32), same_site: true, max_age: 86_400
run Rack::URLMap.new(
"/sidekiq1" => Sidekiq::Pro::Web.with(redis_pool: POOL1),
"/sidekiq2" => Sidekiq::Pro::Web.with(redis_pool: POOL2),
)
I see Sidekiq::RedisClientAdapter
which might be the solve but it isn't immediately clear how to use it.
from sidekiq.
Oh, the wiki was updated, did you review it when you got this error?
https://github.com/sidekiq/sidekiq/wiki/Pro-Web-UI#sharding
from sidekiq.
Nope, I missed that. Fixes my issue!
from sidekiq.
Related Issues (20)
- undefined method broadcast for class ActiveSupport::Logger using sidekiq 7.3.0 with rails 7.1.3.4 in Docker HOT 5
- The testing "jobs" obj is empty when adding jobs to at batch using push_bulk and requiring 'sidekiq/testing' in a helper file HOT 2
- Overwriting RAILS_ENV? HOT 6
- Middleware to add stacktrace at the point of being enqued does not work in production HOT 5
- Sidekiq Queue Limit Set in Redis leading to incomplete utilization of available threads HOT 5
- Namespace not being used HOT 9
- ERB error backtrace does not show template filename HOT 2
- sidekiq 7.3.0 bottom bar style bug HOT 6
- Sidekiq-wrapped ActiveJob from an engine doesn't seem to retry automatically HOT 1
- Batch description mutability HOT 1
- Backoff not adding randomness? HOT 5
- Invalid crontab expression not caught on initialization and breaks Periodic Jobs
- Move away from SHA1
- Feature Request: Allow Sidekiq::Batch::LINGER to be customized globally HOT 5
- Periodic jobs stop running until sidekiq is restarted HOT 5
- How to Support Upgrades to Redis without Suffering Job Loss HOT 1
- CSV Iterable job example HOT 1
- Implement active job adapter HOT 1
- Composable rate limiters
- Ent Rate Limiting wiki update HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sidekiq.