diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-25 02:50:48 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-25 02:50:48 +0100 |
commit | 42dcb0d4cb119ecaac824fb1cace1fb011075b5e (patch) | |
tree | 49431aa95bbe2bc1c32129dc3e4c04d555e09ccc /config/initializers | |
parent | a08e724476f47b85de9bb334eeadaf882a7a23ee (diff) |
Adding Sidekiq for background processing (firstly just of mailers)
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/sidekiq.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb new file mode 100644 index 000000000..83958d700 --- /dev/null +++ b/config/initializers/sidekiq.rb @@ -0,0 +1,11 @@ +redis_conn = proc { + $redis.dup +} + +Sidekiq.configure_server do |config| + config.redis = ConnectionPool.new(size: 5, &redis_conn) +end + +Sidekiq.configure_client do |config| + config.redis = ConnectionPool.new(size: 25, &redis_conn) +end |