diff options
| -rw-r--r-- | lib/killjoy/message_bus.rb | 3 | ||||
| -rw-r--r-- | lib/killjoy/mongo/consumer.rb | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/killjoy/message_bus.rb b/lib/killjoy/message_bus.rb index c2818e6..05b4c2f 100644 --- a/lib/killjoy/message_bus.rb +++ b/lib/killjoy/message_bus.rb @@ -18,7 +18,8 @@ module Killjoy else consumer.work(message) end - rescue + rescue => error + Killjoy.logger.error(error.message) message.reject! if message reject(info) end diff --git a/lib/killjoy/mongo/consumer.rb b/lib/killjoy/mongo/consumer.rb index 9379e3a..b5c14ef 100644 --- a/lib/killjoy/mongo/consumer.rb +++ b/lib/killjoy/mongo/consumer.rb @@ -1,6 +1,8 @@ module Killjoy module Mongo class Consumer < Consumer + attr_reader :mongo_client + def initialize(writers, shard) @mongo_client = Spank::IOC.resolve(:mongo_client) super(writers, shard) |
