rbg 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. data/lib/rbg.rb +6 -2
  2. metadata +1 -1
data/lib/rbg.rb CHANGED
@@ -32,7 +32,9 @@ module Rbg
32
32
  STDOUT.flush
33
33
 
34
34
  # Run the before_fork function
35
- self.config.before_fork.call
35
+ if config.before_fork.is_a?(Proc)
36
+ self.config.before_fork.call
37
+ end
36
38
 
37
39
  # Fork an appropriate number of workers
38
40
  self.fork_workers(self.config.workers)
@@ -96,7 +98,9 @@ module Rbg
96
98
  Signal.trap('TERM', proc {Process.exit(0)})
97
99
 
98
100
  # Execure before_fork code
99
- self.config.after_fork.call
101
+ if config.after_fork.is_a?(Proc)
102
+ self.config.after_fork.call
103
+ end
100
104
 
101
105
  if self.config.script.is_a?(String)
102
106
  require self.config.script
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: