negroku 2.3.5 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9638f23e921f10eca6d3a6b6b237bb9c6bd5acc3
|
4
|
+
data.tar.gz: e36ab13c316e591e03e82177e47322a4e90e52f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c9b772a996117b173b892674588fa005c880dbe89bf5909156317bbf8d383256d89ebd718534b28c884374ad07dae005f1693736c3e15ab6a522bd991930722
|
7
|
+
data.tar.gz: 563dfe701079158e130cca8a2456fcf49a47e314181d73b2f00ff48793c4977482915507ac90b30acbf730598cd1ccc9a24fad022d405222bd99828fecf75cfb
|
data/lib/negroku/cli/stage.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
include Capistrano::DSL
|
2
|
+
|
1
3
|
module Negroku::Stage
|
2
4
|
extend self
|
3
5
|
|
@@ -10,7 +12,10 @@ module Negroku::Stage
|
|
10
12
|
}
|
11
13
|
|
12
14
|
add_stage_file config
|
13
|
-
|
15
|
+
if ask_set_vars
|
16
|
+
load deploy_config_path
|
17
|
+
Negroku::Env.bulk(config[:stage_name])
|
18
|
+
end
|
14
19
|
end
|
15
20
|
|
16
21
|
def ask_set_vars
|
@@ -50,6 +50,10 @@ namespace :load do
|
|
50
50
|
# Set the app server socket if nginx is being used
|
51
51
|
set :app_server_socket, -> { fetch(:unicorn_socket) } if required? 'capistrano/nginx'
|
52
52
|
|
53
|
+
## Eye monitoring
|
54
|
+
set :unicorn_master_cpu_checks, "check :cpu, :every => 30, :below => 80, :times => 3"
|
55
|
+
set :unicorn_master_memory_checks, "check :memory, :every => 30, :below => 150.megabytes, :times => [3,5]"
|
56
|
+
|
53
57
|
end
|
54
58
|
end
|
55
59
|
|
@@ -10,15 +10,18 @@
|
|
10
10
|
# soft restart
|
11
11
|
restart_command "kill -USR2 {PID}"
|
12
12
|
|
13
|
-
|
14
|
-
|
13
|
+
# Master process checks
|
14
|
+
<%= fetch(:unicorn_master_cpu_checks) %>
|
15
|
+
<%= fetch(:unicorn_master_memory_checks) %>
|
15
16
|
|
16
17
|
start_timeout 100.seconds
|
17
18
|
restart_grace 30.seconds
|
18
19
|
|
19
20
|
monitor_children do
|
20
21
|
stop_command "kill -QUIT {PID}"
|
21
|
-
|
22
|
-
|
22
|
+
|
23
|
+
# Children processes checks
|
24
|
+
<%= fetch(:unicorn_children_cpu_checks, fetch(:unicorn_master_cpu_checks)) %>
|
25
|
+
<%= fetch(:unicorn_children_memory_checks, fetch(:unicorn_master_memory_checks)) %>
|
23
26
|
end
|
24
27
|
end
|
data/lib/negroku/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: negroku
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Ignacio Donoso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|