kostya-bluepill 0.0.60.2 → 0.0.60.3
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/bluepill +7 -2
- data/bluepill.gemspec +0 -1
- data/lib/bluepill.rb +2 -2
- data/lib/bluepill/application.rb +8 -6
- data/lib/bluepill/controller.rb +12 -1
- data/lib/bluepill/group.rb +2 -2
- data/lib/bluepill/logger.rb +63 -0
- data/lib/bluepill/process.rb +19 -19
- data/lib/bluepill/socket.rb +1 -1
- data/lib/bluepill/system.rb +3 -1
- data/lib/bluepill/trigger.rb +2 -1
- data/lib/bluepill/version.rb +1 -1
- data/spec/lib/bluepill/logger_spec.rb +3 -0
- metadata +165 -184
data/bin/bluepill
CHANGED
@@ -18,6 +18,10 @@ options = {
|
|
18
18
|
|
19
19
|
OptionParser.new do |opts|
|
20
20
|
opts.banner = "Usage: bluepill [app] cmd [options]"
|
21
|
+
opts.on('-l', "--logfile LOGFILE", "Path to logfile, defaults to #{options[:log_file]}") do |file|
|
22
|
+
options[:log_file] = file
|
23
|
+
end
|
24
|
+
|
21
25
|
opts.on('-c', "--base-dir DIR", "Directory to store bluepill socket and pid files, defaults to #{options[:base_dir]}") do |base_dir|
|
22
26
|
options[:base_dir] = base_dir
|
23
27
|
end
|
@@ -45,6 +49,7 @@ OptionParser.new do |opts|
|
|
45
49
|
puts " stop [TARGET]\t\tIssues the stop command for the target process or group, defaults to all processes"
|
46
50
|
puts " restart [TARGET]\t\tIssues the restart command for the target process or group, defaults to all processes"
|
47
51
|
puts " unmonitor [TARGET]\t\tStop monitoring target process or group, defaults to all processes"
|
52
|
+
puts " log [TARGET]\t\tShow the log for the specified process or group, defaults to all for app"
|
48
53
|
puts " quit\t\t\tStop bluepill"
|
49
54
|
puts
|
50
55
|
puts "See http://github.com/arya/bluepill for README"
|
@@ -55,9 +60,9 @@ OptionParser.new do |opts|
|
|
55
60
|
help.call if ARGV.empty?
|
56
61
|
end.parse!
|
57
62
|
|
58
|
-
APPLICATION_COMMANDS = %w(status start stop restart unmonitor quit)
|
63
|
+
APPLICATION_COMMANDS = %w(status start stop restart unmonitor quit log)
|
59
64
|
|
60
|
-
controller = Bluepill::Controller.new(options.slice(:base_dir))
|
65
|
+
controller = Bluepill::Controller.new(options.slice(:base_dir, :log_file))
|
61
66
|
|
62
67
|
if controller.running_applications.include?(File.basename($0)) && File.symlink?($0)
|
63
68
|
# bluepill was called as a symlink with the name of the target application
|
data/bluepill.gemspec
CHANGED
@@ -18,7 +18,6 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.add_dependency 'state_machine', '~> 1.1.0'
|
19
19
|
s.add_dependency 'activesupport', '>= 3.0.0'
|
20
20
|
s.add_dependency 'i18n', '>= 0.5.0'
|
21
|
-
s.add_dependency 'madvertise-logging'
|
22
21
|
|
23
22
|
s.add_development_dependency 'bundler', '>= 1.0.10'
|
24
23
|
s.add_development_dependency 'rake', '!= 0.9.0'
|
data/lib/bluepill.rb
CHANGED
@@ -7,8 +7,7 @@ require 'thread'
|
|
7
7
|
require 'monitor'
|
8
8
|
require 'syslog'
|
9
9
|
require 'timeout'
|
10
|
-
|
11
|
-
require 'madvertise-logging'
|
10
|
+
require 'logger'
|
12
11
|
|
13
12
|
require 'active_support/inflector'
|
14
13
|
require 'active_support/core_ext/hash'
|
@@ -25,6 +24,7 @@ require 'bluepill/socket'
|
|
25
24
|
require "bluepill/process"
|
26
25
|
require "bluepill/process_statistics"
|
27
26
|
require "bluepill/group"
|
27
|
+
require "bluepill/logger"
|
28
28
|
require "bluepill/condition_watch"
|
29
29
|
require 'bluepill/trigger'
|
30
30
|
require 'bluepill/triggers/flapping'
|
data/lib/bluepill/application.rb
CHANGED
@@ -20,9 +20,8 @@ module Bluepill
|
|
20
20
|
self.kill_timeout = options[:kill_timeout] || 10
|
21
21
|
|
22
22
|
self.groups = {}
|
23
|
-
|
24
|
-
|
25
|
-
self.logger = Madvertise::Logging::ImprovedLogger.new(log_dev, "bluepill-#{self.name}")
|
23
|
+
|
24
|
+
self.logger = Bluepill::Logger.new(:log_file => self.log_file, :stdout => foreground?).prefix_with(self.name)
|
26
25
|
|
27
26
|
self.setup_signal_traps
|
28
27
|
self.setup_pids_dir
|
@@ -60,7 +59,7 @@ module Bluepill
|
|
60
59
|
def add_process(process, group_name = nil)
|
61
60
|
group_name = group_name.to_s if group_name
|
62
61
|
|
63
|
-
self.groups[group_name] ||= Group.new(group_name, :logger => self.logger)
|
62
|
+
self.groups[group_name] ||= Group.new(group_name, :logger => self.logger.prefix_with(group_name))
|
64
63
|
self.groups[group_name].add_process(process)
|
65
64
|
end
|
66
65
|
|
@@ -102,7 +101,8 @@ module Bluepill
|
|
102
101
|
end
|
103
102
|
client.write(Marshal.dump(response))
|
104
103
|
rescue StandardError => e
|
105
|
-
logger.exception
|
104
|
+
logger.err("Got exception in cmd listener: %s `%s`" % [e.class.name, e.message])
|
105
|
+
e.backtrace.each {|l| logger.err(l)}
|
106
106
|
ensure
|
107
107
|
begin
|
108
108
|
client.close
|
@@ -119,6 +119,8 @@ module Bluepill
|
|
119
119
|
|
120
120
|
Daemonize.daemonize unless foreground?
|
121
121
|
|
122
|
+
self.logger.reopen
|
123
|
+
|
122
124
|
$0 = "bluepill: #{self.name}"
|
123
125
|
|
124
126
|
self.groups.each {|_, group| group.determine_initial_state }
|
@@ -158,7 +160,7 @@ module Bluepill
|
|
158
160
|
Signal.trap("INT", &terminator)
|
159
161
|
|
160
162
|
Signal.trap("HUP") do
|
161
|
-
self.logger.
|
163
|
+
self.logger.reopen if self.logger
|
162
164
|
end
|
163
165
|
end
|
164
166
|
|
data/lib/bluepill/controller.rb
CHANGED
@@ -3,9 +3,10 @@ require 'fileutils'
|
|
3
3
|
|
4
4
|
module Bluepill
|
5
5
|
class Controller
|
6
|
-
attr_accessor :base_dir, :sockets_dir, :pids_dir
|
6
|
+
attr_accessor :base_dir, :log_file, :sockets_dir, :pids_dir
|
7
7
|
|
8
8
|
def initialize(options = {})
|
9
|
+
self.log_file = options[:log_file]
|
9
10
|
self.base_dir = options[:base_dir] || File.join(ENV['HOME'], '.bluepill')
|
10
11
|
self.sockets_dir = File.join(base_dir, 'socks')
|
11
12
|
self.pids_dir = File.join(base_dir, 'pids')
|
@@ -41,6 +42,16 @@ module Bluepill
|
|
41
42
|
else
|
42
43
|
puts "bluepill[#{pid}] not running"
|
43
44
|
end
|
45
|
+
when :log
|
46
|
+
log_file_location = self.send_to_daemon(application, :log_file)
|
47
|
+
log_file_location = self.log_file if log_file_location.to_s.strip.empty?
|
48
|
+
|
49
|
+
requested_pattern = args.first
|
50
|
+
grep_pattern = self.grep_pattern(application, requested_pattern)
|
51
|
+
|
52
|
+
tail = "tail -n 100 -f #{log_file_location} | grep -E '#{grep_pattern}'"
|
53
|
+
puts "Tailing log for #{requested_pattern}..."
|
54
|
+
Kernel.exec(tail)
|
44
55
|
else
|
45
56
|
$stderr.puts "Unknown command `%s` (or application `%s` has not been loaded yet)" % [command, command]
|
46
57
|
exit(1)
|
data/lib/bluepill/group.rb
CHANGED
@@ -11,7 +11,7 @@ module Bluepill
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def add_process(process)
|
14
|
-
process.logger = self.logger
|
14
|
+
process.logger = self.logger.prefix_with(process.name)
|
15
15
|
self.processes << process
|
16
16
|
end
|
17
17
|
|
@@ -69,4 +69,4 @@ module Bluepill
|
|
69
69
|
end
|
70
70
|
|
71
71
|
end
|
72
|
-
end
|
72
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
module Bluepill
|
3
|
+
class Logger
|
4
|
+
LOG_METHODS = [:emerg, :alert, :crit, :err, :warning, :notice, :info, :debug]
|
5
|
+
|
6
|
+
def initialize(options = {})
|
7
|
+
@options = options
|
8
|
+
@logger = options[:logger] || self.create_logger
|
9
|
+
@prefix = options[:prefix]
|
10
|
+
@stdout = options[:stdout]
|
11
|
+
@prefixes = {}
|
12
|
+
end
|
13
|
+
|
14
|
+
LOG_METHODS.each do |method|
|
15
|
+
eval <<-END
|
16
|
+
def #{method}(msg, prefix = [])
|
17
|
+
if @logger.is_a?(self.class)
|
18
|
+
@logger.#{method}(msg, [@prefix] + prefix)
|
19
|
+
else
|
20
|
+
s_prefix = prefix.size > 0 ? "[\#{prefix.compact.join(':')}] " : ""
|
21
|
+
if @stdout
|
22
|
+
$stdout.puts("[#{method}]: \#{s_prefix}\#{msg}")
|
23
|
+
$stdout.flush
|
24
|
+
end
|
25
|
+
@logger.#{method}("\#{s_prefix}\#{msg}")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
END
|
29
|
+
end
|
30
|
+
|
31
|
+
def prefix_with(prefix)
|
32
|
+
@prefixes[prefix] ||= self.class.new(:logger => self, :prefix => prefix)
|
33
|
+
end
|
34
|
+
|
35
|
+
def reopen
|
36
|
+
if @logger.is_a?(self.class)
|
37
|
+
@logger.reopen
|
38
|
+
else
|
39
|
+
@logger = create_logger
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
protected
|
44
|
+
def create_logger
|
45
|
+
if @options[:log_file]
|
46
|
+
LoggerAdapter.new(@options[:log_file])
|
47
|
+
else
|
48
|
+
Syslog.close if Syslog.opened? # need to explictly close it before reopening it
|
49
|
+
Syslog.open(@options[:identity] || 'bluepill', Syslog::LOG_PID, Syslog::LOG_LOCAL6)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
class LoggerAdapter < ::Logger
|
54
|
+
LOGGER_EQUIVALENTS =
|
55
|
+
{:debug => :debug, :err => :error, :warning => :warn, :info => :info, :emerg => :fatal, :alert => :warn, :crit => :fatal, :notice => :info}
|
56
|
+
|
57
|
+
LOG_METHODS.each do |method|
|
58
|
+
next if method == LOGGER_EQUIVALENTS[method]
|
59
|
+
alias_method method, LOGGER_EQUIVALENTS[method]
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
data/lib/bluepill/process.rb
CHANGED
@@ -179,7 +179,7 @@ module Bluepill
|
|
179
179
|
|
180
180
|
# Also, when a process changes state, we should re-populate its child list
|
181
181
|
if self.monitor_children?
|
182
|
-
self.logger.
|
182
|
+
self.logger.warning "Clearing child list"
|
183
183
|
self.children.clear
|
184
184
|
end
|
185
185
|
logger.info "Going from #{transition.from_name} => #{transition.to_name}"
|
@@ -235,7 +235,7 @@ module Bluepill
|
|
235
235
|
case cmd
|
236
236
|
when "start"
|
237
237
|
if self.process_running?(true)
|
238
|
-
logger.
|
238
|
+
logger.warning("Refusing to re-run start command on an already running process.")
|
239
239
|
else
|
240
240
|
dispatch!(:start, "user initiated")
|
241
241
|
end
|
@@ -263,7 +263,7 @@ module Bluepill
|
|
263
263
|
end
|
264
264
|
|
265
265
|
def start_process
|
266
|
-
logger.
|
266
|
+
logger.warning "Executing start command: #{start_command}"
|
267
267
|
|
268
268
|
if self.daemonize?
|
269
269
|
System.daemonize(start_command, self.system_command_options)
|
@@ -274,8 +274,8 @@ module Bluepill
|
|
274
274
|
result = System.execute_blocking(start_command, self.system_command_options)
|
275
275
|
|
276
276
|
unless result[:exit_code].zero?
|
277
|
-
logger.
|
278
|
-
logger.
|
277
|
+
logger.warning "Start command execution returned non-zero exit code:"
|
278
|
+
logger.warning result.inspect
|
279
279
|
end
|
280
280
|
end
|
281
281
|
end
|
@@ -286,20 +286,20 @@ module Bluepill
|
|
286
286
|
def stop_process
|
287
287
|
if stop_command
|
288
288
|
cmd = self.prepare_command(stop_command)
|
289
|
-
logger.
|
289
|
+
logger.warning "Executing stop command: #{cmd}"
|
290
290
|
|
291
291
|
with_timeout(stop_grace_time) do
|
292
292
|
result = System.execute_blocking(cmd, self.system_command_options)
|
293
293
|
|
294
294
|
unless result[:exit_code].zero?
|
295
|
-
logger.
|
296
|
-
logger.
|
295
|
+
logger.warning "Stop command execution returned non-zero exit code:"
|
296
|
+
logger.warning result.inspect
|
297
297
|
end
|
298
298
|
end
|
299
299
|
|
300
300
|
elsif stop_signals
|
301
301
|
# issue stop signals with configurable delay between each
|
302
|
-
logger.
|
302
|
+
logger.warning "Sending stop signals to #{actual_pid}"
|
303
303
|
@threads << Thread.new(self, stop_signals.clone) do |process, stop_signals|
|
304
304
|
signal = stop_signals.shift
|
305
305
|
logger.info "Sending signal #{signal} to #{process.actual_pid}"
|
@@ -322,7 +322,7 @@ module Bluepill
|
|
322
322
|
end
|
323
323
|
end
|
324
324
|
else
|
325
|
-
logger.
|
325
|
+
logger.warning "Executing default stop command. Sending TERM signal to #{actual_pid}"
|
326
326
|
signal_process("TERM")
|
327
327
|
end
|
328
328
|
self.unlink_pid # TODO: we only write the pid file if we daemonize, should we only unlink it if we daemonize?
|
@@ -334,20 +334,20 @@ module Bluepill
|
|
334
334
|
if restart_command
|
335
335
|
cmd = self.prepare_command(restart_command)
|
336
336
|
|
337
|
-
logger.
|
337
|
+
logger.warning "Executing restart command: #{cmd}"
|
338
338
|
|
339
339
|
with_timeout(restart_grace_time) do
|
340
340
|
result = System.execute_blocking(cmd, self.system_command_options)
|
341
341
|
|
342
342
|
unless result[:exit_code].zero?
|
343
|
-
logger.
|
344
|
-
logger.
|
343
|
+
logger.warning "Restart command execution returned non-zero exit code:"
|
344
|
+
logger.warning result.inspect
|
345
345
|
end
|
346
346
|
end
|
347
347
|
|
348
348
|
self.skip_ticks_for(restart_grace_time)
|
349
349
|
else
|
350
|
-
logger.
|
350
|
+
logger.warning "No restart_command specified. Must stop and start to restart"
|
351
351
|
self.stop_process
|
352
352
|
# the tick will bring it back.
|
353
353
|
end
|
@@ -371,7 +371,7 @@ module Bluepill
|
|
371
371
|
::Process.kill(code, actual_pid)
|
372
372
|
true
|
373
373
|
rescue Exception => e
|
374
|
-
logger.
|
374
|
+
logger.err "Failed to signal process #{actual_pid} with code #{code}: #{e}"
|
375
375
|
false
|
376
376
|
end
|
377
377
|
|
@@ -391,7 +391,7 @@ module Bluepill
|
|
391
391
|
str = File.read(pid_file)
|
392
392
|
str.to_i if str.size > 0
|
393
393
|
else
|
394
|
-
logger.
|
394
|
+
logger.warning("pid_file #{pid_file} does not exist or cannot be read")
|
395
395
|
nil
|
396
396
|
end
|
397
397
|
end
|
@@ -441,7 +441,7 @@ module Bluepill
|
|
441
441
|
# Construct a new process wrapper for each new found children
|
442
442
|
new_children_pids.each do |child_pid|
|
443
443
|
name = "<child(pid:#{child_pid})>"
|
444
|
-
logger = self.logger
|
444
|
+
logger = self.logger.prefix_with(name)
|
445
445
|
|
446
446
|
child = self.child_process_factory.create_child_process(name, child_pid, logger)
|
447
447
|
@children << child
|
@@ -471,8 +471,8 @@ module Bluepill
|
|
471
471
|
Timeout.timeout(secs.to_f, &blk)
|
472
472
|
|
473
473
|
rescue Timeout::Error
|
474
|
-
logger.
|
475
|
-
logger.
|
474
|
+
logger.err "Execution is taking longer than expected. Unmonitoring."
|
475
|
+
logger.err "Did you forget to tell bluepill to daemonize this process?"
|
476
476
|
self.dispatch!("unmonitor")
|
477
477
|
end
|
478
478
|
end
|
data/lib/bluepill/socket.rb
CHANGED
data/lib/bluepill/system.rb
CHANGED
@@ -215,8 +215,10 @@ module Bluepill
|
|
215
215
|
FileUtils.touch(pid_file)
|
216
216
|
File.unlink(pid_file)
|
217
217
|
return true
|
218
|
+
|
218
219
|
rescue Exception => e
|
219
|
-
|
220
|
+
logger.warning "%s - %s" % [e.class.name, e.message]
|
221
|
+
e.backtrace.each {|l| logger.warning l}
|
220
222
|
return false
|
221
223
|
end
|
222
224
|
|
data/lib/bluepill/trigger.rb
CHANGED
data/lib/bluepill/version.rb
CHANGED
metadata
CHANGED
@@ -1,230 +1,213 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: kostya-bluepill
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.60.3
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 60
|
10
|
-
- 2
|
11
|
-
version: 0.0.60.2
|
12
6
|
platform: ruby
|
13
|
-
authors:
|
7
|
+
authors:
|
14
8
|
- Arya Asemanfar
|
15
9
|
- Gary Tsang
|
16
10
|
- Rohith Ravi
|
17
11
|
autorequire:
|
18
12
|
bindir: bin
|
19
13
|
cert_chain: []
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
dependencies:
|
24
|
-
- !ruby/object:Gem::Dependency
|
14
|
+
date: 2012-08-16 00:00:00.000000000 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
25
17
|
name: daemons
|
26
|
-
|
27
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
28
19
|
none: false
|
29
|
-
requirements:
|
20
|
+
requirements:
|
30
21
|
- - ~>
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
hash: 27
|
33
|
-
segments:
|
34
|
-
- 1
|
35
|
-
- 1
|
36
|
-
- 4
|
22
|
+
- !ruby/object:Gem::Version
|
37
23
|
version: 1.1.4
|
38
24
|
- - <=
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
hash: 31
|
41
|
-
segments:
|
42
|
-
- 1
|
43
|
-
- 1
|
44
|
-
- 6
|
25
|
+
- !ruby/object:Gem::Version
|
45
26
|
version: 1.1.6
|
46
27
|
type: :runtime
|
47
|
-
version_requirements: *id001
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: state_machine
|
50
28
|
prerelease: false
|
51
|
-
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
none: false
|
31
|
+
requirements:
|
32
|
+
- - ~>
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 1.1.4
|
35
|
+
- - <=
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 1.1.6
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: state_machine
|
40
|
+
requirement: !ruby/object:Gem::Requirement
|
52
41
|
none: false
|
53
|
-
requirements:
|
42
|
+
requirements:
|
54
43
|
- - ~>
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
hash: 19
|
57
|
-
segments:
|
58
|
-
- 1
|
59
|
-
- 1
|
60
|
-
- 0
|
44
|
+
- !ruby/object:Gem::Version
|
61
45
|
version: 1.1.0
|
62
46
|
type: :runtime
|
63
|
-
version_requirements: *id002
|
64
|
-
- !ruby/object:Gem::Dependency
|
65
|
-
name: activesupport
|
66
47
|
prerelease: false
|
67
|
-
|
48
|
+
version_requirements: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 1.1.0
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: activesupport
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
68
57
|
none: false
|
69
|
-
requirements:
|
70
|
-
- -
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
hash: 7
|
73
|
-
segments:
|
74
|
-
- 3
|
75
|
-
- 0
|
76
|
-
- 0
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
77
61
|
version: 3.0.0
|
78
62
|
type: :runtime
|
79
|
-
version_requirements: *id003
|
80
|
-
- !ruby/object:Gem::Dependency
|
81
|
-
name: i18n
|
82
63
|
prerelease: false
|
83
|
-
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 3.0.0
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: i18n
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
84
73
|
none: false
|
85
|
-
requirements:
|
86
|
-
- -
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
hash: 11
|
89
|
-
segments:
|
90
|
-
- 0
|
91
|
-
- 5
|
92
|
-
- 0
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
93
77
|
version: 0.5.0
|
94
78
|
type: :runtime
|
95
|
-
version_requirements: *id004
|
96
|
-
- !ruby/object:Gem::Dependency
|
97
|
-
name: madvertise-logging
|
98
79
|
prerelease: false
|
99
|
-
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
100
81
|
none: false
|
101
|
-
requirements:
|
102
|
-
- -
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
|
105
|
-
|
106
|
-
- 0
|
107
|
-
version: "0"
|
108
|
-
type: :runtime
|
109
|
-
version_requirements: *id005
|
110
|
-
- !ruby/object:Gem::Dependency
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: 0.5.0
|
86
|
+
- !ruby/object:Gem::Dependency
|
111
87
|
name: bundler
|
112
|
-
|
113
|
-
requirement: &id006 !ruby/object:Gem::Requirement
|
88
|
+
requirement: !ruby/object:Gem::Requirement
|
114
89
|
none: false
|
115
|
-
requirements:
|
116
|
-
- -
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
hash: 3
|
119
|
-
segments:
|
120
|
-
- 1
|
121
|
-
- 0
|
122
|
-
- 10
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
123
93
|
version: 1.0.10
|
124
94
|
type: :development
|
125
|
-
version_requirements: *id006
|
126
|
-
- !ruby/object:Gem::Dependency
|
127
|
-
name: rake
|
128
95
|
prerelease: false
|
129
|
-
|
96
|
+
version_requirements: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: 1.0.10
|
102
|
+
- !ruby/object:Gem::Dependency
|
103
|
+
name: rake
|
104
|
+
requirement: !ruby/object:Gem::Requirement
|
130
105
|
none: false
|
131
|
-
requirements:
|
132
|
-
- -
|
133
|
-
- !ruby/object:Gem::Version
|
134
|
-
hash: 59
|
135
|
-
segments:
|
136
|
-
- 0
|
137
|
-
- 9
|
138
|
-
- 0
|
106
|
+
requirements:
|
107
|
+
- - ! '!='
|
108
|
+
- !ruby/object:Gem::Version
|
139
109
|
version: 0.9.0
|
140
110
|
type: :development
|
141
|
-
version_requirements: *id007
|
142
|
-
- !ruby/object:Gem::Dependency
|
143
|
-
name: rspec-core
|
144
111
|
prerelease: false
|
145
|
-
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '!='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.9.0
|
118
|
+
- !ruby/object:Gem::Dependency
|
119
|
+
name: rspec-core
|
120
|
+
requirement: !ruby/object:Gem::Requirement
|
146
121
|
none: false
|
147
|
-
requirements:
|
122
|
+
requirements:
|
148
123
|
- - ~>
|
149
|
-
- !ruby/object:Gem::Version
|
150
|
-
|
151
|
-
segments:
|
152
|
-
- 2
|
153
|
-
- 0
|
154
|
-
version: "2.0"
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '2.0'
|
155
126
|
type: :development
|
156
|
-
version_requirements: *id008
|
157
|
-
- !ruby/object:Gem::Dependency
|
158
|
-
name: rspec-expectations
|
159
127
|
prerelease: false
|
160
|
-
|
128
|
+
version_requirements: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ~>
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '2.0'
|
134
|
+
- !ruby/object:Gem::Dependency
|
135
|
+
name: rspec-expectations
|
136
|
+
requirement: !ruby/object:Gem::Requirement
|
161
137
|
none: false
|
162
|
-
requirements:
|
138
|
+
requirements:
|
163
139
|
- - ~>
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
|
166
|
-
segments:
|
167
|
-
- 2
|
168
|
-
- 0
|
169
|
-
version: "2.0"
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '2.0'
|
170
142
|
type: :development
|
171
|
-
version_requirements: *id009
|
172
|
-
- !ruby/object:Gem::Dependency
|
173
|
-
name: rr
|
174
143
|
prerelease: false
|
175
|
-
|
144
|
+
version_requirements: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
146
|
+
requirements:
|
147
|
+
- - ~>
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '2.0'
|
150
|
+
- !ruby/object:Gem::Dependency
|
151
|
+
name: rr
|
152
|
+
requirement: !ruby/object:Gem::Requirement
|
176
153
|
none: false
|
177
|
-
requirements:
|
154
|
+
requirements:
|
178
155
|
- - ~>
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
|
181
|
-
segments:
|
182
|
-
- 1
|
183
|
-
- 0
|
184
|
-
version: "1.0"
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '1.0'
|
185
158
|
type: :development
|
186
|
-
version_requirements: *id010
|
187
|
-
- !ruby/object:Gem::Dependency
|
188
|
-
name: faker
|
189
159
|
prerelease: false
|
190
|
-
|
160
|
+
version_requirements: !ruby/object:Gem::Requirement
|
161
|
+
none: false
|
162
|
+
requirements:
|
163
|
+
- - ~>
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '1.0'
|
166
|
+
- !ruby/object:Gem::Dependency
|
167
|
+
name: faker
|
168
|
+
requirement: !ruby/object:Gem::Requirement
|
191
169
|
none: false
|
192
|
-
requirements:
|
170
|
+
requirements:
|
193
171
|
- - ~>
|
194
|
-
- !ruby/object:Gem::Version
|
195
|
-
|
196
|
-
segments:
|
197
|
-
- 0
|
198
|
-
- 9
|
199
|
-
version: "0.9"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0.9'
|
200
174
|
type: :development
|
201
|
-
version_requirements: *id011
|
202
|
-
- !ruby/object:Gem::Dependency
|
203
|
-
name: yard
|
204
175
|
prerelease: false
|
205
|
-
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
206
177
|
none: false
|
207
|
-
requirements:
|
178
|
+
requirements:
|
208
179
|
- - ~>
|
209
|
-
- !ruby/object:Gem::Version
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '0.9'
|
182
|
+
- !ruby/object:Gem::Dependency
|
183
|
+
name: yard
|
184
|
+
requirement: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
186
|
+
requirements:
|
187
|
+
- - ~>
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: '0.7'
|
215
190
|
type: :development
|
216
|
-
|
217
|
-
|
218
|
-
|
191
|
+
prerelease: false
|
192
|
+
version_requirements: !ruby/object:Gem::Requirement
|
193
|
+
none: false
|
194
|
+
requirements:
|
195
|
+
- - ~>
|
196
|
+
- !ruby/object:Gem::Version
|
197
|
+
version: '0.7'
|
198
|
+
description: Bluepill keeps your daemons up while taking up as little resources as
|
199
|
+
possible. After all you probably want the resources of your server to be used by
|
200
|
+
whatever daemons you are running rather than the thing that's supposed to make sure
|
201
|
+
they are brought back up, should they die or misbehave.
|
202
|
+
email:
|
219
203
|
- entombedvirus@gmail.com
|
220
|
-
executables:
|
204
|
+
executables:
|
221
205
|
- bluepill
|
222
206
|
extensions: []
|
223
|
-
|
224
|
-
extra_rdoc_files:
|
207
|
+
extra_rdoc_files:
|
225
208
|
- LICENSE
|
226
209
|
- README.md
|
227
|
-
files:
|
210
|
+
files:
|
228
211
|
- .gitignore
|
229
212
|
- .rspec
|
230
213
|
- DESIGN.md
|
@@ -249,6 +232,7 @@ files:
|
|
249
232
|
- lib/bluepill/dsl/process_factory.rb
|
250
233
|
- lib/bluepill/dsl/process_proxy.rb
|
251
234
|
- lib/bluepill/group.rb
|
235
|
+
- lib/bluepill/logger.rb
|
252
236
|
- lib/bluepill/process.rb
|
253
237
|
- lib/bluepill/process_conditions.rb
|
254
238
|
- lib/bluepill/process_conditions/always_true.rb
|
@@ -263,42 +247,39 @@ files:
|
|
263
247
|
- lib/bluepill/triggers/flapping.rb
|
264
248
|
- lib/bluepill/util/rotational_array.rb
|
265
249
|
- lib/bluepill/version.rb
|
250
|
+
- spec/lib/bluepill/logger_spec.rb
|
266
251
|
- spec/lib/bluepill/process_statistics_spec.rb
|
267
252
|
- spec/lib/bluepill/system_spec.rb
|
268
253
|
- spec/spec_helper.rb
|
269
|
-
has_rdoc: true
|
270
254
|
homepage: http://github.com/kostya/bluepill
|
271
255
|
licenses: []
|
272
|
-
|
273
256
|
post_install_message:
|
274
257
|
rdoc_options: []
|
275
|
-
|
276
|
-
require_paths:
|
258
|
+
require_paths:
|
277
259
|
- lib
|
278
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
260
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
279
261
|
none: false
|
280
|
-
requirements:
|
281
|
-
- -
|
282
|
-
- !ruby/object:Gem::Version
|
283
|
-
|
284
|
-
segments:
|
262
|
+
requirements:
|
263
|
+
- - ! '>='
|
264
|
+
- !ruby/object:Gem::Version
|
265
|
+
version: '0'
|
266
|
+
segments:
|
285
267
|
- 0
|
286
|
-
|
287
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
268
|
+
hash: 162993619
|
269
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
288
270
|
none: false
|
289
|
-
requirements:
|
290
|
-
- -
|
291
|
-
- !ruby/object:Gem::Version
|
292
|
-
|
293
|
-
segments:
|
271
|
+
requirements:
|
272
|
+
- - ! '>='
|
273
|
+
- !ruby/object:Gem::Version
|
274
|
+
version: '0'
|
275
|
+
segments:
|
294
276
|
- 0
|
295
|
-
|
277
|
+
hash: 162993619
|
296
278
|
requirements: []
|
297
|
-
|
298
279
|
rubyforge_project:
|
299
|
-
rubygems_version: 1.
|
280
|
+
rubygems_version: 1.8.24
|
300
281
|
signing_key:
|
301
282
|
specification_version: 3
|
302
283
|
summary: A process monitor written in Ruby with stability and minimalism in mind.
|
303
284
|
test_files: []
|
304
|
-
|
285
|
+
has_rdoc:
|