foreverb 0.3.0.h → 0.3.0.i

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.
data/lib/forever/base.rb CHANGED
@@ -102,7 +102,7 @@ module Forever
102
102
  if forking
103
103
  begin
104
104
  GC.start
105
- pids << Process.fork { job_call(job) }
105
+ pids << fork { job_call(job) }
106
106
  rescue Errno::EAGAIN
107
107
  puts "\n\nWait all processes since os cannot create a new one\n\n"
108
108
  Process.waitall
@@ -113,19 +113,19 @@ module Forever
113
113
  current_queue += 1
114
114
  end
115
115
 
116
- # Detach zombies, our ps will be happier
117
- pids.each do |p|
118
- begin
119
- Process.getpgid(p)
120
- rescue Errno::ESRCH
121
- pids.delete(p)
122
- Process.detach(p)
123
- end
124
- end
125
-
126
116
  sleep 0.5
127
117
  end
128
118
 
119
+ # Detach zombies, our ps will be happier
120
+ pids.each do |p|
121
+ begin
122
+ pids << Process.getpgid(p)
123
+ rescue Errno::ESRCH
124
+ pids.delete(p)
125
+ Process.detach(p)
126
+ end
127
+ end
128
+
129
129
  # Invoke our after :all filters
130
130
  filters[:after][:all].each { |block| safe_call(block) }
131
131
 
@@ -346,7 +346,7 @@ module Forever
346
346
 
347
347
  def write_config!
348
348
  config_was = File.exist?(FOREVER_PATH) ? YAML.load_file(FOREVER_PATH) : []
349
- config_was.delete_if { |conf| conf[:file] == file }
349
+ config_was.delete_if { |conf| conf.nil? || conf.empty? || conf[:file] == file }
350
350
  config_was << config
351
351
  File.open(FOREVER_PATH, "w") { |f| f.write config_was.to_yaml }
352
352
  end
@@ -1,3 +1,3 @@
1
1
  module Forever
2
- VERSION = "0.3.0.h" unless defined?(Forever::VERSION)
2
+ VERSION = "0.3.0.i" unless defined?(Forever::VERSION)
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreverb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 61
4
+ hash: 58
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
9
  - 0
10
- - h
11
- version: 0.3.0.h
10
+ - i
11
+ version: 0.3.0.i
12
12
  platform: ruby
13
13
  authors:
14
14
  - DAddYE