pinky 0.2.7-java → 0.2.8-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.7
1
+ 0.2.8
@@ -4,8 +4,9 @@ module Pinky
4
4
  import java.util.concurrent.Executors
5
5
 
6
6
  def initialize queue, subscription_opts, logger, handle_message
7
- @queue, @subscription_opts, @logger, @handle_message = queue, subscription_opts, logger, handle_message
8
- @subscription_opts[:executor] = executor unless @subscription_opts[:executor]
7
+ @queue, @subscription_opts, @logger, @handle_message = queue, subscription_opts.dup, logger, handle_message
8
+ @reraise_errors = @subscription_opts.delete(:reraise_errors)
9
+ @subscription_opts[:executor] = executor unless @subscription_opts[:executor]
9
10
  listen!
10
11
  end
11
12
 
@@ -19,8 +20,13 @@ module Pinky
19
20
  private
20
21
  def listen!
21
22
  @subscription = @queue.subscribe(@subscription_opts) do |headers, msg|
22
- @handle_message.call headers.properties.headers, msg
23
- headers.ack
23
+ begin
24
+ @handle_message.call headers.properties.headers, msg
25
+ headers.ack
26
+ rescue => e
27
+ @logger.error "!!!Error handling message: #{e.message}"
28
+ raise if @reraise_errors
29
+ end
24
30
  end
25
31
  self
26
32
  end
data/pinky.gemspec CHANGED
@@ -5,12 +5,12 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "pinky"
8
- s.version = "0.2.7"
8
+ s.version = "0.2.8"
9
9
  s.platform = "java"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.authors = ["Joel Friedman"]
13
- s.date = "2013-03-22"
13
+ s.date = "2013-03-24"
14
14
  s.description = "Cache your api objects in member easier, with associations."
15
15
  s.email = "asher.friedman@gmail.com"
16
16
  s.extra_rdoc_files = [
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: pinky
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.7
5
+ version: 0.2.8
6
6
  platform: java
7
7
  authors:
8
8
  - Joel Friedman
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-22 00:00:00.000000000 Z
12
+ date: 2013-03-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty