beanpool 0.1.5 → 0.1.6
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.
- checksums.yaml +4 -4
- data/lib/beanpool/connections.rb +3 -4
- data/lib/beanpool/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 653e0fce682e4fd504e3672e2e8a936abfd6a04c
|
4
|
+
data.tar.gz: e05f021332f3390d27c93c28f031025c3f145b15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 919cc7491509dd1b65a2e7d236f00000e10ec059295e72fa3a9ae106139eb2a22bd56c9edd7467093e3c22a600b0dd3a33f05f13297c1b84f5b0669114f74196
|
7
|
+
data.tar.gz: ec0b09a421c7ca9870904af515d91653b6ef5a900c8d504e45029e771ece17855e366c069768928c8b3dcd86055264a1cd1e90b8b6701bf0a758c4005d3e14be
|
data/lib/beanpool/connections.rb
CHANGED
@@ -97,6 +97,7 @@ class Beanpool
|
|
97
97
|
options = keystring_hash(options)
|
98
98
|
pri = options["pri"] || 32000
|
99
99
|
ttr = options["ttr"] || 60
|
100
|
+
reset = options['reset_use_tube']
|
100
101
|
tube_name = options["tube_name"] || 'default'
|
101
102
|
delay = (options["delay"]).to_i
|
102
103
|
|
@@ -112,10 +113,8 @@ class Beanpool
|
|
112
113
|
connection = @connections[ip_id]
|
113
114
|
connection.tubes[tube_name].put(body, :pri => pri, :delay => delay, :ttr => ttr)
|
114
115
|
end
|
115
|
-
|
116
|
-
|
117
|
-
def use_tube(tube_name)
|
118
|
-
connection.tubes.use(tube_name)
|
116
|
+
# Force default tube reset if requested.
|
117
|
+
connection.tubes.use(reset_use_tube) if connection && reset_use_tube
|
119
118
|
end
|
120
119
|
|
121
120
|
def keystring_hash(hash)
|
data/lib/beanpool/version.rb
CHANGED