google-cloud-pubsub 1.0.1 → 1.0.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d3c2b3976af69e59bdb1ea9653f42164db682ce28a929b5325d760c46bab4aa
|
4
|
+
data.tar.gz: 0f922862ba91d39e1ba8f55a66d2a6699392157ed850e129ed127dc9f63ac1d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d33fdcdb157fa0795e6fc28517ccdd26b8b03b3380dd96bd6f931063eae3ac30a5c4d3b5e9dafd32bbc93ee76e4db3544611c4b1ac9a63ad6068422c9bab466e
|
7
|
+
data.tar.gz: b8218aceaa79d35777e540a43764e7e49474e5dc393c508384f12e4dff09e7d5e1470a8d5a9f2ed6bf96c17d54c63be8489aefbf32babccfeb57a15035867521
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### 1.0.2 / 2019-10-10
|
4
|
+
|
5
|
+
#### Bug Fixes
|
6
|
+
|
7
|
+
* Fix Subscriber state after releasing messages
|
8
|
+
* Correctly reset the Subscriber state when releasing messages
|
9
|
+
after the callback either raises an error, or the callback
|
10
|
+
fails to call acknowledge or modify_ack_deadline on the
|
11
|
+
message. If a Subscriber fills it's inventory, and stops
|
12
|
+
pulling additional messages before all the callbacks are
|
13
|
+
completed (moves to a paused state) then the Subscriber
|
14
|
+
could become stuck in a paused state.
|
15
|
+
* A paused Subscriber will now check whether to unpause after
|
16
|
+
the callback is completed, instead of when acknowledge or
|
17
|
+
modify_ack_deadline is called on the message.
|
18
|
+
|
3
19
|
### 1.0.1 / 2019-10-01
|
4
20
|
|
5
21
|
#### Bug Fixes
|
@@ -292,8 +292,8 @@ module Google
|
|
292
292
|
##
|
293
293
|
# @private
|
294
294
|
def to_s
|
295
|
-
|
296
|
-
|
295
|
+
"(subscription: #{subscription_name}, " \
|
296
|
+
"streams: [#{stream_pool.map(&:to_s).join(', ')}])"
|
297
297
|
end
|
298
298
|
|
299
299
|
##
|
@@ -123,7 +123,6 @@ module Google
|
|
123
123
|
synchronize do
|
124
124
|
@inventory.remove ack_ids
|
125
125
|
@subscriber.buffer.acknowledge ack_ids
|
126
|
-
unpause_streaming!
|
127
126
|
end
|
128
127
|
|
129
128
|
true
|
@@ -138,12 +137,27 @@ module Google
|
|
138
137
|
synchronize do
|
139
138
|
@inventory.remove mod_ack_ids
|
140
139
|
@subscriber.buffer.modify_ack_deadline deadline, mod_ack_ids
|
141
|
-
unpause_streaming!
|
142
140
|
end
|
143
141
|
|
144
142
|
true
|
145
143
|
end
|
146
144
|
|
145
|
+
##
|
146
|
+
# @private
|
147
|
+
def release *messages
|
148
|
+
ack_ids = coerce_ack_ids messages
|
149
|
+
return if ack_ids.empty?
|
150
|
+
|
151
|
+
synchronize do
|
152
|
+
# Remove from inventory if the message was not explicitly acked or
|
153
|
+
# nacked in the callback
|
154
|
+
@inventory.remove ack_ids
|
155
|
+
# Check whether to unpause the stream only after the callback is
|
156
|
+
# completed and the thread is being reclaimed.
|
157
|
+
unpause_streaming!
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
147
161
|
def push request
|
148
162
|
synchronize { @request_queue.push request }
|
149
163
|
end
|
@@ -168,8 +182,8 @@ module Google
|
|
168
182
|
|
169
183
|
# @private
|
170
184
|
def to_s
|
171
|
-
|
172
|
-
|
185
|
+
"(inventory: #{@inventory.count}, " \
|
186
|
+
"status: #{status}, thread: #{thread_status})"
|
173
187
|
end
|
174
188
|
|
175
189
|
# @private
|
@@ -279,7 +293,7 @@ module Google
|
|
279
293
|
rescue StandardError => callback_error
|
280
294
|
stream.subscriber.error! callback_error
|
281
295
|
ensure
|
282
|
-
stream.
|
296
|
+
stream.release msg
|
283
297
|
end
|
284
298
|
end
|
285
299
|
end
|
@@ -342,6 +356,12 @@ module Google
|
|
342
356
|
end
|
343
357
|
|
344
358
|
def status
|
359
|
+
return "stopped" if stopped?
|
360
|
+
return "paused" if paused?
|
361
|
+
"running"
|
362
|
+
end
|
363
|
+
|
364
|
+
def thread_status
|
345
365
|
return "not started" if @background_thread.nil?
|
346
366
|
|
347
367
|
status = @background_thread.status
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-pubsub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Moore
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-10-
|
12
|
+
date: 2019-10-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-cloud-core
|