mobilize-base 1.379 → 1.380
Sign up to get free protection for your applications and to get access to all the features.
data/lib/mobilize-base.rb
CHANGED
@@ -33,22 +33,10 @@ module Mobilize
|
|
33
33
|
raise "Could not find #{file}" unless ::File.exists?(file)
|
34
34
|
file
|
35
35
|
end
|
36
|
-
# Currently config_file_updated? is not used because it is too slow.
|
37
|
-
def Base.config_file_updated?(config_name)
|
38
|
-
@config_mtime ||= {}
|
39
|
-
mtime = File.mtime(Base.config_file(config_name))
|
40
|
-
if !@config_mtime[config_name] or @config_mtime[config_name] < mtime
|
41
|
-
@config_mtime[config_name] = mtime
|
42
|
-
return true
|
43
|
-
else
|
44
|
-
return false
|
45
|
-
end
|
46
|
-
end
|
47
36
|
def Base.config(config_name)
|
48
37
|
@config ||= {}
|
49
38
|
if !@config[config_name]
|
50
39
|
yaml_path = Base.config_file(config_name)
|
51
|
-
puts "reload config #{yaml_path}"
|
52
40
|
if ::File.exists?(yaml_path)
|
53
41
|
@config[config_name] = ::YAML.load_file(yaml_path)[Base.env]
|
54
42
|
else
|
@@ -157,9 +157,9 @@ module Mobilize
|
|
157
157
|
if count.to_i > idle_pids.length or count == 0
|
158
158
|
return false
|
159
159
|
elsif count
|
160
|
-
"kill #{idle_pids[0..count-1].join(" ")}".bash(false)
|
160
|
+
"kill -QUIT #{idle_pids[0..count-1].join(" ")}".bash(false)
|
161
161
|
else
|
162
|
-
"kill #{idle_pids.join(" ")}".bash(false)
|
162
|
+
"kill -QUIT #{idle_pids.join(" ")}".bash(false)
|
163
163
|
end
|
164
164
|
return true
|
165
165
|
end
|
@@ -171,7 +171,7 @@ module Mobilize
|
|
171
171
|
if idle_stale_pids.length == 0
|
172
172
|
return false
|
173
173
|
else
|
174
|
-
"kill #{idle_stale_pids.join(" ")}".bash(false)
|
174
|
+
"kill -QUIT #{idle_stale_pids.join(" ")}".bash(false)
|
175
175
|
end
|
176
176
|
return true
|
177
177
|
end
|
@@ -181,9 +181,9 @@ module Mobilize
|
|
181
181
|
if count.to_i > pids.length or count == 0
|
182
182
|
return false
|
183
183
|
elsif count
|
184
|
-
"kill #{pids[0..count-1].join(" ")}".bash(false)
|
184
|
+
"kill -QUIT #{pids[0..count-1].join(" ")}".bash(false)
|
185
185
|
elsif pids.length>0
|
186
|
-
"kill #{pids.join(" ")}".bash(false)
|
186
|
+
"kill -QUIT #{pids.join(" ")}".bash(false)
|
187
187
|
else
|
188
188
|
return false
|
189
189
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mobilize-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.380'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-09-
|
13
|
+
date: 2013-09-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|
@@ -253,7 +253,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
253
253
|
version: '0'
|
254
254
|
segments:
|
255
255
|
- 0
|
256
|
-
hash: -
|
256
|
+
hash: -211517416966763766
|
257
257
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
258
258
|
none: false
|
259
259
|
requirements:
|
@@ -262,7 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
262
262
|
version: '0'
|
263
263
|
segments:
|
264
264
|
- 0
|
265
|
-
hash: -
|
265
|
+
hash: -211517416966763766
|
266
266
|
requirements: []
|
267
267
|
rubyforge_project: mobilize-base
|
268
268
|
rubygems_version: 1.8.23
|