logjam_agent 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,11 +23,13 @@ module LogjamAgent
23
23
  end
24
24
 
25
25
  # TODO: mutex!
26
- def send(msg)
26
+ def send(msg, engine)
27
27
  return if paused?
28
28
  begin
29
29
  # $stderr.puts msg
30
- exchange.publish(msg, :key => @config[:routing_key], :persistent => false)
30
+ key = @config[:routing_key]
31
+ key += ".#{engine}" if engine
32
+ exchange.publish(msg, :key => key, :persistent => false)
31
33
  rescue Exception => exception
32
34
  reraise_expectation_errors!
33
35
  pause(exception)
@@ -19,7 +19,8 @@ module LogjamAgent
19
19
  end
20
20
 
21
21
  def forward
22
- @forwarder.send(@fields.to_json)
22
+ engine = @fields.delete(:engine)
23
+ @forwarder.send(@fields.to_json, engine)
23
24
  rescue Exception => e
24
25
  handle_forwarding_error(e)
25
26
  end
@@ -1,3 +1,3 @@
1
1
  module LogjamAgent
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logjam_agent
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Stefan Kaes