caploy 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
|
|
1
1
|
Capistrano::Configuration.instance.load do
|
2
2
|
|
3
3
|
namespace :memcache do
|
4
|
-
%(start stop restart status).each do |step|
|
4
|
+
%w(start stop restart status).each do |step|
|
5
5
|
desc "#{step} memcache"
|
6
6
|
task step do
|
7
7
|
try_sudo "service memcached #{step}"
|
@@ -12,9 +12,6 @@ Capistrano::Configuration.instance.load do
|
|
12
12
|
task :flush do
|
13
13
|
run %Q{echo "flush_all" | nc -q 2 127.0.0.1 11211}
|
14
14
|
end
|
15
|
-
|
16
|
-
after "deploy:restart", "memcache:flush"
|
17
|
-
after "deploy:start", "memcache:flush"
|
18
15
|
end
|
19
16
|
|
20
17
|
end
|
@@ -6,6 +6,7 @@ Capistrano::Configuration.instance.load do
|
|
6
6
|
_cset :unicorn_err_log, "log/unicorn.stderr.log"
|
7
7
|
_cset :unicorn_worker_processes, 2
|
8
8
|
_cset :unicorn_listen_backlog, 2048
|
9
|
+
_cset :sidekiq_redis_count, 1
|
9
10
|
|
10
11
|
require "capistrano-unicorn"
|
11
12
|
|
@@ -23,7 +24,8 @@ Capistrano::Configuration.instance.load do
|
|
23
24
|
'unicorn_err_log' => unicorn_err_log,
|
24
25
|
'stage' => stage,
|
25
26
|
'unicorn_listen_backlog' => unicorn_listen_backlog,
|
26
|
-
'unicorn_worker_processes' => unicorn_worker_processes
|
27
|
+
'unicorn_worker_processes' => unicorn_worker_processes,
|
28
|
+
'sidekiq_redis_count' => sidekiq_redis_count
|
27
29
|
}
|
28
30
|
put(render_erb_template(template_path, vars), config_path)
|
29
31
|
end
|
@@ -31,4 +31,10 @@ after_fork do |server, worker|
|
|
31
31
|
if defined?(ActiveRecord::Base)
|
32
32
|
ActiveRecord::Base.establish_connection
|
33
33
|
end
|
34
|
+
|
35
|
+
if defined?(Sidekiq)
|
36
|
+
Sidekiq.configure_client do |config|
|
37
|
+
config.redis = { :size => <%= sidekiq_redis_count %> }
|
38
|
+
end
|
39
|
+
end
|
34
40
|
end
|
data/lib/caploy/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gemcutter
|