google-cloud-pubsub 0.39.1 → 0.39.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 +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/google/cloud/pubsub/subscriber.rb +11 -7
- data/lib/google/cloud/pubsub/subscriber/stream.rb +11 -7
- data/lib/google/cloud/pubsub/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4f34b6b5827c709ce82dec3ae2c24557ec83f77bd8e381d32d82f100532894e3
|
|
4
|
+
data.tar.gz: 4a07069df138d0bf056421edcf1f0f611ad5911e7317f16e2561dcc0421daba1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a52c5e7fd8d4425f1beab86ac4235b817148f4e89992a7cdcfee7e3c87a4706334f12489aa7d7b305575d42cd446a4b714cd97f7132e3b61ac782f41bfcc6f87
|
|
7
|
+
data.tar.gz: ff2bfa65c4f97d6ec09602d4fdf889f279531b45ec55bc4e4d70481530e978a85f22832fc42d08bf14b11caf9ad3970411570da97b970c0ceda4a30d44153b7a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
+
### 0.39.2 / 2019-09-17
|
|
4
|
+
|
|
5
|
+
#### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* Do not interrupt Subscriber callbacks when stopping
|
|
8
|
+
* Allow in-process callbacks to complete when a Subscriber is stopped.
|
|
9
|
+
|
|
10
|
+
#### Documentation
|
|
11
|
+
|
|
12
|
+
* Update Subscriber stop and wait documentation
|
|
13
|
+
* Update Subscriber#stop and Subscriber#wait! method
|
|
14
|
+
|
|
3
15
|
### 0.39.1 / 2019-09-04
|
|
4
16
|
|
|
5
17
|
#### Features
|
|
@@ -123,10 +123,12 @@ module Google
|
|
|
123
123
|
end
|
|
124
124
|
|
|
125
125
|
##
|
|
126
|
-
#
|
|
127
|
-
#
|
|
128
|
-
# the
|
|
129
|
-
#
|
|
126
|
+
# Immediately stops the subscriber. No new messages will be pulled from
|
|
127
|
+
# the subscription. All actions taken on received messages that have not
|
|
128
|
+
# yet been sent to the API will be sent to the API. All received but
|
|
129
|
+
# unprocessed messages will be released back to the API and redelivered.
|
|
130
|
+
# Use {#wait!} to block until the subscriber is fully stopped and all
|
|
131
|
+
# received messages have been processed or released.
|
|
130
132
|
#
|
|
131
133
|
# @return [Subscriber] returns self so calls can be chained.
|
|
132
134
|
def stop
|
|
@@ -147,9 +149,11 @@ module Google
|
|
|
147
149
|
|
|
148
150
|
##
|
|
149
151
|
# Blocks until the subscriber is fully stopped and all received messages
|
|
150
|
-
# have been
|
|
151
|
-
#
|
|
152
|
-
# the subscriber
|
|
152
|
+
# have been processed or released.
|
|
153
|
+
#
|
|
154
|
+
# Does not stop the subscriber. To stop the subscriber, first call
|
|
155
|
+
# {#stop} and then call {#wait!} to block until the subscriber is
|
|
156
|
+
# stopped.
|
|
153
157
|
#
|
|
154
158
|
# @return [Subscriber] returns self so calls can be chained.
|
|
155
159
|
def wait!
|
|
@@ -88,8 +88,9 @@ module Google
|
|
|
88
88
|
@pause_cond.broadcast
|
|
89
89
|
|
|
90
90
|
# Now that the reception thread is stopped, immediately stop the
|
|
91
|
-
# callback thread pool
|
|
92
|
-
|
|
91
|
+
# callback thread pool. All queued callbacks will see the stream
|
|
92
|
+
# is stopped and perform a noop.
|
|
93
|
+
@callback_thread_pool.shutdown
|
|
93
94
|
|
|
94
95
|
# Once all the callbacks are stopped, we can stop the inventory.
|
|
95
96
|
@inventory.stop
|
|
@@ -107,6 +108,9 @@ module Google
|
|
|
107
108
|
end
|
|
108
109
|
|
|
109
110
|
def wait!
|
|
111
|
+
# Wait for all queued callbacks to be processed.
|
|
112
|
+
@callback_thread_pool.wait_for_termination 60
|
|
113
|
+
|
|
110
114
|
self
|
|
111
115
|
end
|
|
112
116
|
|
|
@@ -268,14 +272,14 @@ module Google
|
|
|
268
272
|
return unless callback_thread_pool.running?
|
|
269
273
|
|
|
270
274
|
Concurrent::Promises.future_on(
|
|
271
|
-
callback_thread_pool,
|
|
272
|
-
) do |
|
|
275
|
+
callback_thread_pool, self, rec_msg
|
|
276
|
+
) do |stream, msg|
|
|
273
277
|
begin
|
|
274
|
-
|
|
278
|
+
stream.subscriber.callback.call msg unless stream.stopped?
|
|
275
279
|
rescue StandardError => callback_error
|
|
276
|
-
|
|
280
|
+
stream.subscriber.error! callback_error
|
|
277
281
|
ensure
|
|
278
|
-
|
|
282
|
+
stream.inventory.remove msg.ack_id
|
|
279
283
|
end
|
|
280
284
|
end
|
|
281
285
|
end
|
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: 0.39.
|
|
4
|
+
version: 0.39.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-09-
|
|
12
|
+
date: 2019-09-17 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: google-cloud-core
|