Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sidekiq does not support `Proc` namespaces in its redis connection. Therefore, we need to use (1) a `Redis::Namespace` wrapper class and (2) a `Redis::DynamicNamespace` wrapper class, which allows Proc namespaces by using `method_missing` to wrap the redis commands in a namespace when calling the commands. This is discussed here: resque/redis-namespace#75 The `Redis::DynamicNamespace` wrapper is suggested here: resque/redis-namespace#75 (comment) resque/redis-namespace#75 (comment) See also this stackoverflow question: http://stackoverflow.com/q/40638628/2066546 Please note, this is just an intermediate step. Eventually, we will move to separate redis server instances. Internal trello cards: https://trello.com/c/6xYBRb09/1075-redis-bottleneck https://trello.com/c/cypH3vmW/896-multitenancy
- Loading branch information
Showing
6 changed files
with
83 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
|
||
# Caching | ||
require 'redis-rails' | ||
require 'redis-namespace' | ||
|
||
# Workers | ||
require 'sidekiq' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters