process_controller 0.0.9 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/control/version.rb +1 -1
- data/lib/control_helper.rb +7 -1
- data/lib/process_controller.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0db69689906421430209aed3683ed17216ad4635
|
4
|
+
data.tar.gz: 667d42a65f3d3442f3522916a66b0945497a3aad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d43dea61361cba50631d413c4feb0bdf025ab72b76496780236c4489317320ffa327c141a663e73f8ef88ab2c17e2fed046011c6c1afba5fdb59e46a2ddf5f1
|
7
|
+
data.tar.gz: 991b2b60a5198c5c4d6b37f826e818bf0e3924fbb0eeb1f93c1d63eae85f88c760cb618bccb1523ed2b11713d3e21fd72c366fc0d9f2ac09a9c35e43fadc242a
|
data/lib/control/version.rb
CHANGED
data/lib/control_helper.rb
CHANGED
@@ -141,7 +141,9 @@ module ControlHelper
|
|
141
141
|
pid = find_app_pid(options)
|
142
142
|
if pid
|
143
143
|
p "#{prefix} Ok, Restarted. new pid #{pid}"
|
144
|
-
|
144
|
+
if http_server?(options) && !skip_workers_message?(options)
|
145
|
+
print_workers_started_and_stopped(options)
|
146
|
+
end
|
145
147
|
exit(0)
|
146
148
|
else
|
147
149
|
p "#{prefix} problem restarting. Check your code. #{pid}"
|
@@ -155,6 +157,10 @@ module ControlHelper
|
|
155
157
|
print_workers_and_delete_files!('workers closed', Control_P::WORKERS_CLOSED_EXTENTION)
|
156
158
|
end
|
157
159
|
|
160
|
+
def skip_workers_message?(options)
|
161
|
+
options.fetch(Control_P::OPTIONS_ATTRIBUTES[:skip_workers_message], false)
|
162
|
+
end
|
163
|
+
|
158
164
|
def print_workers_and_delete_files!(type, extention)
|
159
165
|
p "#{Dir[extention].length.to_s} #{type}"
|
160
166
|
Dir.glob(extention).each { |f| File.delete(f) }
|
data/lib/process_controller.rb
CHANGED
@@ -7,7 +7,7 @@ class Control_P
|
|
7
7
|
app_name: 'app_name', port_num: 'port_num', app_filename: 'app_filename',
|
8
8
|
http_server: 'http_server', kill_command: 'kill_command',
|
9
9
|
restart_command: 'restart_command', environment: 'environment',
|
10
|
-
start_command: 'start_command'}.with_indifferent_access
|
10
|
+
start_command: 'start_command', skip_workers_message: 'skip_workers_message'}.with_indifferent_access
|
11
11
|
|
12
12
|
FIND_BY_OPTIONS = {app_filename: 'app_filename', port_num: 'port_num', app_name: 'app_name', pid_file: 'pid_file'}.with_indifferent_access
|
13
13
|
WORKERS_STARTED_EXTENTION = '*.started'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: process_controller
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ohad partuck
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|