Permalink
Browse files

added sidekiq support for unicorn, bumped version

  • Loading branch information...
Michael Schiller
Michael Schiller committed Nov 13, 2012
1 parent adf5336 commit a7907cd8ddde4d9572bf843efcb3c5f9bb1c9b39
Showing with 10 additions and 2 deletions.
  1. +3 −1 lib/caploy/recipes/unicorn.rb
  2. +6 −0 lib/caploy/templates/unicorn/unicorn.rb.erb
  3. +1 −1 lib/caploy/version.rb
@@ -6,6 +6,7 @@
_cset :unicorn_err_log, "log/unicorn.stderr.log"
_cset :unicorn_worker_processes, 2
_cset :unicorn_listen_backlog, 2048
+ _cset :sidekiq_redis_count, 1
require "capistrano-unicorn"
@@ -23,7 +24,8 @@
'unicorn_err_log' => unicorn_err_log,
'stage' => stage,
'unicorn_listen_backlog' => unicorn_listen_backlog,
- 'unicorn_worker_processes' => unicorn_worker_processes
+ 'unicorn_worker_processes' => unicorn_worker_processes,
+ 'sidekiq_redis_count' => sidekiq_redis_count
}
put(render_erb_template(template_path, vars), config_path)
end
@@ -31,4 +31,10 @@ after_fork do |server, worker|
if defined?(ActiveRecord::Base)
ActiveRecord::Base.establish_connection
end
+
+ if defined?(Sidekiq)
+ Sidekiq.configure_client do |config|
+ config.redis = { :size => <%= sidekiq_redis_count %> }
+ end
+ end
end
View
@@ -1,3 +1,3 @@
module Caploy
- VERSION = "0.1.2"
+ VERSION = "0.1.3"
end

0 comments on commit a7907cd

Please sign in to comment.