svutil 0.9.9 → 0.9.10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/svutil.rb +1 -1
- data/lib/svutil/process_manager.rb +5 -3
- metadata +7 -7
data/lib/svutil.rb
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
module SVUtil
|
2
2
|
class ProcessManager
|
3
|
-
attr_accessor :after_fork
|
4
|
-
|
5
3
|
def initialize(klass_or_instance, config)
|
6
4
|
@server_instance = if klass_or_instance.instance_of?(Class)
|
7
5
|
klass_or_instance.new
|
@@ -37,6 +35,10 @@ module SVUtil
|
|
37
35
|
shutdown("Process Completed")
|
38
36
|
end
|
39
37
|
|
38
|
+
def after_fork(&block)
|
39
|
+
@after_fork = block
|
40
|
+
end
|
41
|
+
|
40
42
|
private
|
41
43
|
def shutdown(reason = nil, exit_code = 0)
|
42
44
|
Log.info "Shutting Down (#{reason})"
|
@@ -72,8 +74,8 @@ module SVUtil
|
|
72
74
|
|
73
75
|
def daemonize
|
74
76
|
fork and exit
|
75
|
-
@after_fork.call unless @after_fork.nil?
|
76
77
|
redirect_io
|
78
|
+
@after_fork.call unless @after_fork.nil?
|
77
79
|
end
|
78
80
|
|
79
81
|
def redirect_io
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: svutil
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.10
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-01-05 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: newgem
|
16
|
-
requirement: &
|
16
|
+
requirement: &70320191685320 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.5.3
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70320191685320
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: hoe
|
27
|
-
requirement: &
|
27
|
+
requirement: &70320191684040 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '2.12'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70320191684040
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rdoc
|
38
|
-
requirement: &
|
38
|
+
requirement: &70320187153440 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '3.10'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70320187153440
|
47
47
|
description: A simple managed process builder for Ruby projects
|
48
48
|
email:
|
49
49
|
- daniel@netfox.com
|