bach 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/bachd +13 -8
- data/lib/bach/version.rb +1 -1
- metadata +7 -7
data/bin/bachd
CHANGED
@@ -77,14 +77,19 @@ client = Stomp::Client.new options['broker']
|
|
77
77
|
client.subscribe '/queue/bach' do |message|
|
78
78
|
puts "Received #{message.headers['message-id']}"
|
79
79
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
80
|
+
begin
|
81
|
+
options = JSON.parse message.body
|
82
|
+
results = Job.new(options).execute
|
83
|
+
|
84
|
+
result_json = JSON.generate results
|
85
|
+
destination = message.headers['reply-to']
|
86
|
+
client.publish destination, result_json
|
87
|
+
|
88
|
+
puts "Finished processing #{message.headers['message-id']}"
|
89
|
+
rescue => e
|
90
|
+
puts "Error processing #{message.headers['message-id']}:"
|
91
|
+
puts "\t" + [ e.message, *e.backtrace ].join "\n\t"
|
92
|
+
end
|
88
93
|
end
|
89
94
|
|
90
95
|
puts "Waiting for clients..."
|
data/lib/bach/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bach
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-10-08 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: stomp
|
16
|
-
requirement: &
|
16
|
+
requirement: &70206022073640 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70206022073640
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: espeak-ruby
|
27
|
-
requirement: &
|
27
|
+
requirement: &70206022069740 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70206022069740
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: json
|
38
|
-
requirement: &
|
38
|
+
requirement: &70206022066540 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70206022066540
|
47
47
|
description: Provide a Text-to-Speech service on the service bus
|
48
48
|
email:
|
49
49
|
- craig@barkingiguana.com
|