pinky 0.1.3-java → 0.1.4-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.1.3
1
+ 0.1.4
@@ -47,7 +47,7 @@ module Pinky
47
47
 
48
48
  #TODO: is having one channel bad, should this be one per exchange?
49
49
  def channel
50
- @channel ||= @connection.create_channel
50
+ @channel ||= @connection.create_channel.tap { |c| c.prefetch = (@config.delete(:prefetch_count) || 1) }
51
51
  end
52
52
 
53
53
  def create_queue topic_key
@@ -19,16 +19,12 @@ module Pinky
19
19
  private
20
20
  def listen!
21
21
  @subscription = @queue.subscribe(@subscription_opts) do |headers, msg|
22
- handle_message_on_other_thread headers, msg
22
+ @handle_message.call headers.properties.headers, msg
23
+ headers.ack
23
24
  end
24
25
  self
25
26
  end
26
27
 
27
- def handle_message_on_other_thread headers, msg
28
- @handle_message.call headers.properties.headers, msg
29
- headers.ack
30
- end
31
-
32
28
  def log_error e
33
29
  @logger.error "An error has occured on another thread: #{e}#{$/}#{e.backtrace}"
34
30
  end
@@ -5,12 +5,12 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "pinky"
8
- s.version = "0.1.3"
8
+ s.version = "0.1.4"
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 = "2012-12-07"
13
+ s.date = "2012-12-10"
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.1.3
5
+ version: 0.1.4
6
6
  platform: java
7
7
  authors:
8
8
  - Joel Friedman
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-07 00:00:00.000000000 Z
12
+ date: 2012-12-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty