-
Notifications
You must be signed in to change notification settings - Fork 159
Should it work with current sidekiq? #270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@maurercw Unfortunately, fakeredis isn't compatible with redis-client and Sidekiq 7 depends on redis-client. There are more details about redis-client/sidekiq at sds/mock_redis#253 (the issue with fakeredis is exactly the same) |
martijnbolhuis
added a commit
to compliance-innovations/sidekiq-batch
that referenced
this issue
Mar 1, 2024
- Replace fakeredis by a real redis because it is not compatible with Sidekiq 7 and the new redis-client gem [1]. - Fix tests. [1]: guilleiguaran/fakeredis#270
martijnbolhuis
added a commit
to compliance-innovations/sidekiq-batch
that referenced
this issue
Mar 7, 2024
- Use string version of true in redis. The redis-client gem does not support booleans [1]. Note that although previously, these values were passed as boolean from Ruby they were already returned as strings when read from redis. - Replace fakeredis gem with an actual Redis in github actions because fakeredis is not compatible with Sidekiq 7 and the redis-client gem [2]. - Remove unsupported Ruby version from Github actions CI. [1]: https://github.com/redis-rb/redis-client?tab=readme-ov-file#type-support [2]: guilleiguaran/fakeredis#270
FWIW, depending on what you need in the test env for sidekiq, you can enable inline mode
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reaching way back here, but back in #66 (almost 10 years ago!) some discussion was happening about how to get fakeredis to work with sidekiq, but I haven't had any luck. It might be related to redis changes moreso than sidekiq, but I'll lay out what I have tried...
Just setting the driver as stated like
redis_details.merge!(:driver => Redis::Connection::Memory) if defined?(Redis::Connection::Memory)
doesn't work as sidekiq's adapter is expecting a symbol:Ok, so I attempt to register the driver myself:
But the redis-client can't initialize the Memory object because the arguments don't line up:
Is there some other way to make this happen, or is the Memory driver no longer compatible?
The text was updated successfully, but these errors were encountered: