bach 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/bachd +13 -8
  2. data/lib/bach/version.rb +1 -1
  3. 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
- options = JSON.parse message.body
81
- results = Job.new(options).execute
82
-
83
- result_json = JSON.generate results
84
- destination = message.headers['reply-to']
85
- client.publish destination, result_json
86
-
87
- puts "Finished processing #{message.headers['message-id']}"
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..."
@@ -1,3 +1,3 @@
1
1
  module Bach
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
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.5
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: &70313060709640 !ruby/object:Gem::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: *70313060709640
24
+ version_requirements: *70206022073640
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: espeak-ruby
27
- requirement: &70313060706580 !ruby/object:Gem::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: *70313060706580
35
+ version_requirements: *70206022069740
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: json
38
- requirement: &70313060703880 !ruby/object:Gem::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: *70313060703880
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