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: 14d53aec7f354efc4a17bad4e9486214fc4ff710
4
- data.tar.gz: b6c15222c644ad3c8238b55c71ea155277cbb07a
3
+ metadata.gz: 9638f23e921f10eca6d3a6b6b237bb9c6bd5acc3
4
+ data.tar.gz: e36ab13c316e591e03e82177e47322a4e90e52f0
5
5
  SHA512:
6
- metadata.gz: d350d87e50c3c4063f1aeb33701addfcb61375a1132ade613ad41f5648d4cf58aeff32352ecc932cc9cb74a4c665eaea3f4eef4dac181091ca02ea0651e2345a
7
- data.tar.gz: 1b8c3cd3b982dbcae2e5e72a07c2f607744c44792d3341ef75db350674ea57ad420964c7e717a84f12a15c0efe3bfd1d80d32f338e3c4e422cdea76961072883
6
+ metadata.gz: 9c9b772a996117b173b892674588fa005c880dbe89bf5909156317bbf8d383256d89ebd718534b28c884374ad07dae005f1693736c3e15ab6a522bd991930722
7
+ data.tar.gz: 563dfe701079158e130cca8a2456fcf49a47e314181d73b2f00ff48793c4977482915507ac90b30acbf730598cd1ccc9a24fad022d405222bd99828fecf75cfb
@@ -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
- Negroku::Env.bulk(config[:stage_name]) if ask_set_vars
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
@@ -22,7 +22,7 @@ namespace :rbenv do
22
22
  desc "Show current environmental variables"
23
23
  task :show do
24
24
  on release_roles :app do
25
- within current_path do
25
+ within shared_path do
26
26
  execute :rbenv, 'vars'
27
27
  end
28
28
  end
@@ -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
 
@@ -43,4 +43,4 @@ require 'negroku/eye/unicorn'
43
43
  require 'negroku/deploy'
44
44
 
45
45
  # Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
46
- Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }
46
+ Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
@@ -10,15 +10,18 @@
10
10
  # soft restart
11
11
  restart_command "kill -USR2 {PID}"
12
12
 
13
- check :cpu, :every => 30, :below => 80, :times => 3
14
- check :memory, :every => 30, :below => 150.megabytes, :times => [3,5]
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
- check :cpu, :every => 30, :below => 80, :times => 3
22
- check :memory, :every => 30, :below => 150.megabytes, :times => [3,5]
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
@@ -1,3 +1,3 @@
1
1
  module Negroku
2
- VERSION = '2.3.5'
2
+ VERSION = '2.4.0'
3
3
  end
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.3.5
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-20 00:00:00.000000000 Z
11
+ date: 2015-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc