queue_map 0.3 → 0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -54,7 +54,11 @@ def start
54
54
  File.open(@consumer.pid_file, "w") { |f| f << pid.to_s }
55
55
  exit 0
56
56
  else
57
- Signal.trap('HUP', 'IGNORE') # Don't die upon logout
57
+ Process.setsid
58
+ exit if fork
59
+ f = File.open(@consumer.log_file, "a")
60
+ STDOUT.reopen(f)
61
+ STDERR.reopen(f)
58
62
  end
59
63
  end
60
64
  @consumer.start
@@ -171,7 +171,11 @@ class QueueMap::Consumer
171
171
  if graceful
172
172
  @shutting_down = true
173
173
  else
174
- exit 0
174
+ begin
175
+ Kernel.exit 0
176
+ ensure
177
+ Kernel.exit! 0
178
+ end
175
179
  end
176
180
  end
177
181
  end
@@ -1,3 +1,3 @@
1
1
  module QueueMap
2
- VERSION="0.3"
2
+ VERSION="0.4"
3
3
  end
data/lib/queue_map.rb CHANGED
@@ -83,7 +83,7 @@ module QueueMap
83
83
  begin
84
84
  yield bunny
85
85
  ensure
86
- bunny.close_connection unless bunny.status == :not_connected
86
+ (bunny.close_connection unless bunny.status == :not_connected) rescue nil
87
87
  end
88
88
  end
89
89
 
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: queue_map
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 3
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 3
9
- version: "0.3"
8
+ - 4
9
+ version: "0.4"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tim Harper