kostya-bluepill 0.0.60.1 → 0.0.60.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +5 -5
- data/lib/bluepill/application.rb +5 -3
- data/lib/bluepill/version.rb +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -256,23 +256,23 @@ The main benefit of using the config options is that Bluepill will be able to mo
|
|
256
256
|
### CLI
|
257
257
|
To start a bluepill process and load a config:
|
258
258
|
|
259
|
-
|
259
|
+
bluepill load /path/to/production.pill
|
260
260
|
|
261
261
|
To act on a process or group:
|
262
262
|
|
263
|
-
|
263
|
+
bluepill <start|stop|restart|unmonitor> <process_or_group_name>
|
264
264
|
|
265
265
|
To view process statuses:
|
266
266
|
|
267
|
-
|
267
|
+
bluepill status
|
268
268
|
|
269
269
|
To view the log for a process or group:
|
270
270
|
|
271
|
-
|
271
|
+
bluepill log <process_or_group_name>
|
272
272
|
|
273
273
|
To quit bluepill:
|
274
274
|
|
275
|
-
|
275
|
+
bluepill quit
|
276
276
|
|
277
277
|
### Logging
|
278
278
|
By default, bluepill uses syslog local6 facility as described in the installation section. But if for any reason you don't want to use syslog, you can use a log file. You can do this by setting the :log\_file option in the config:
|
data/lib/bluepill/application.rb
CHANGED
@@ -7,20 +7,22 @@ module Bluepill
|
|
7
7
|
|
8
8
|
attr_accessor :name, :logger, :base_dir, :socket, :pid_file, :kill_timeout
|
9
9
|
attr_accessor :groups, :work_queue
|
10
|
-
attr_accessor :pids_dir
|
10
|
+
attr_accessor :pids_dir, :log_file
|
11
11
|
|
12
12
|
def initialize(name, options = {})
|
13
13
|
self.name = name
|
14
14
|
|
15
15
|
@foreground = options[:foreground]
|
16
|
+
self.log_file = options[:log_file]
|
16
17
|
self.base_dir = options[:base_dir] || File.join(ENV['HOME'], '.bluepill')
|
17
18
|
self.pid_file = File.join(self.base_dir, 'pids', self.name + ".pid")
|
18
19
|
self.pids_dir = File.join(self.base_dir, 'pids', self.name)
|
19
20
|
self.kill_timeout = options[:kill_timeout] || 10
|
20
21
|
|
21
22
|
self.groups = {}
|
22
|
-
|
23
|
-
|
23
|
+
|
24
|
+
log_dev = foreground? ? :syslog : (self.log_file || STDERR)
|
25
|
+
self.logger = Madvertise::Logging::ImprovedLogger.new(log_dev, "bluepill-#{self.name}")
|
24
26
|
|
25
27
|
self.setup_signal_traps
|
26
28
|
self.setup_pids_dir
|
data/lib/bluepill/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kostya-bluepill
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 187
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
9
|
- 60
|
10
|
-
-
|
11
|
-
version: 0.0.60.
|
10
|
+
- 2
|
11
|
+
version: 0.0.60.2
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Arya Asemanfar
|
@@ -18,7 +18,7 @@ autorequire:
|
|
18
18
|
bindir: bin
|
19
19
|
cert_chain: []
|
20
20
|
|
21
|
-
date: 2012-08-
|
21
|
+
date: 2012-08-16 00:00:00 +04:00
|
22
22
|
default_executable:
|
23
23
|
dependencies:
|
24
24
|
- !ruby/object:Gem::Dependency
|