stapfen 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.md +5 -0
- data/README.md +2 -0
- data/lib/stapfen/version.rb +1 -1
- data/lib/stapfen/worker.rb +15 -5
- metadata +4 -4
data/CHANGES.md
CHANGED
data/README.md
CHANGED
@@ -9,6 +9,8 @@ Stapfen allows you to write one worker class, and use either protocol
|
|
9
9
|
depending on the environment and needs.
|
10
10
|
|
11
11
|
|
12
|
+
**[RDoc here](http://rdoc.info/github/lookout/stapfen/master/frames)**
|
13
|
+
|
12
14
|
## Usage
|
13
15
|
|
14
16
|
(Examples can be found in the `examples/` directory)
|
data/lib/stapfen/version.rb
CHANGED
data/lib/stapfen/worker.rb
CHANGED
@@ -125,6 +125,11 @@ module Stapfen
|
|
125
125
|
end
|
126
126
|
end
|
127
127
|
|
128
|
+
if RUBY_PLATFORM == 'java'
|
129
|
+
info "Telling the JVM to exit cleanly"
|
130
|
+
Java::JavaLang::System.exit(0)
|
131
|
+
end
|
132
|
+
|
128
133
|
return cleanly
|
129
134
|
end
|
130
135
|
|
@@ -208,14 +213,19 @@ module Stapfen
|
|
208
213
|
# Invokes the shutdown block if it has been created, and closes the
|
209
214
|
# {{Stomp::Client}} connection unless it has already been shut down
|
210
215
|
def exit_cleanly
|
211
|
-
info("#{self} exiting
|
216
|
+
info("#{self} exiting ")
|
212
217
|
self.class.destructor.call if self.class.destructor
|
213
218
|
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
219
|
+
info "Killing client"
|
220
|
+
begin
|
221
|
+
# Only close the client if we have one sitting around
|
222
|
+
if client
|
223
|
+
unless client.closed?
|
224
|
+
client.close
|
225
|
+
end
|
218
226
|
end
|
227
|
+
rescue StandardError => exc
|
228
|
+
error "Exception received while trying to close client! #{exc.inspect}"
|
219
229
|
end
|
220
230
|
end
|
221
231
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stapfen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-10-
|
12
|
+
date: 2013-10-21 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A simple gem for writing good basic STOMP workers
|
15
15
|
email:
|
@@ -58,7 +58,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
58
58
|
version: '0'
|
59
59
|
segments:
|
60
60
|
- 0
|
61
|
-
hash:
|
61
|
+
hash: -1242747643436314961
|
62
62
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
63
|
none: false
|
64
64
|
requirements:
|
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
67
|
version: '0'
|
68
68
|
segments:
|
69
69
|
- 0
|
70
|
-
hash:
|
70
|
+
hash: -1242747643436314961
|
71
71
|
requirements: []
|
72
72
|
rubyforge_project:
|
73
73
|
rubygems_version: 1.8.25
|