google-cloud-logging 1.10.4 → 1.10.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c44ea43caa6da57f944c25da29cb76c70b99805fbf517f36273e290f39e51a1
4
- data.tar.gz: 9d4b2142b4713362151659a8af7b959be1950fe895254500a300052655e7c228
3
+ metadata.gz: bd1f41e64309828c0a4ade40f6f37f34f5c880d5bc076cef18c3d864aba75e1d
4
+ data.tar.gz: 58f97d26011dbd5438f3644291096c37cf39fef9ab0394498148153d1a45ac50
5
5
  SHA512:
6
- metadata.gz: 6544f6f25befee91e60d009685797fab479c77d2d679584b35965bea7a44c536efe77a9bb8b68340719937371030129f018eb5fdff34221bff58752ceb98e240
7
- data.tar.gz: c1219e8155a148df9874c5ddb6b0b03b9365b358f3bf3e855beebc9da6acc5307679a8c4c4c387350e8a9169b3a45eb67d0731e297c0c120033831018ff74fec
6
+ metadata.gz: f702d5baed7f22f965e294e4e81ec582aa04b0df72ffb9231d02a41791656acc486e8b0093b9c60c3f5119ceb195cf74208a5fdfa13373758f2d7a20e9326057
7
+ data.tar.gz: cf3d386de873038b9db370e66b85078dc4ed15961e5ba4410f7ac5dc192131db84ced61a9312d215b2e4039587433507c0758b8f913d5101d6ad1ec781d3baaa
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 1.10.5 / 2020-05-05
4
+
5
+ #### Bug Fixes
6
+
7
+ * Prevent error when calling stop! on unused AsyncWriter
8
+
3
9
  ### 1.10.4 / 2020-04-20
4
10
 
5
11
  #### Documentation
@@ -155,7 +155,7 @@ module Google
155
155
  max_threads: @threads, max_queue: @max_queue
156
156
  @thread ||= Thread.new { run_background }
157
157
 
158
- publish_batch! if @batch.ready?
158
+ publish_batch! if @batch&.ready?
159
159
 
160
160
  @cond.broadcast
161
161
  end
@@ -222,6 +222,10 @@ module Google
222
222
  # writer. To stop the writer, first call {#stop} and then call {#wait!}
223
223
  # to block until the writer is stopped.
224
224
  #
225
+ # @param [Number, nil] timeout The maximum number of seconds to wait for
226
+ # shutdown to complete. Will wait forever when the value is `nil`. The
227
+ # default value is `nil`.
228
+ #
225
229
  # @return [AsyncWriter] returns self so calls can be chained.
226
230
  def wait! timeout = nil
227
231
  synchronize do
@@ -237,18 +241,22 @@ module Google
237
241
  ##
238
242
  # Stop this asynchronous writer and block until it has been stopped.
239
243
  #
240
- # @param [Number] timeout Timeout in seconds.
244
+ # @param [Number, nil] timeout The maximum number of seconds to wait for
245
+ # shutdown to complete. Will wait forever when the value is `nil`. The
246
+ # default value is `nil`.
241
247
  # @param [Boolean] force If set to true, and the writer hasn't stopped
242
- # within the given timeout, kill it forcibly by terminating the
243
- # thread. This should be used with extreme caution, as it can
244
- # leave RPCs unfinished. Default is false.
248
+ # within the given timeout, kill it forcibly by terminating the
249
+ # thread. This should be used with extreme caution, as it can
250
+ # leave RPCs unfinished. Default is false.
245
251
  #
246
- # @return [Symbol] Returns `:stopped` if the AsyncWriter was already
247
- # stopped at the time of invocation, `:waited` if it stopped
248
- # during the timeout period, `:timeout` if it is still running
249
- # after the timeout, or `:forced` if it was forcibly killed.
252
+ # @return [Symbol] Returns `:new` if {#write_entries} has never been
253
+ # called on the AsyncWriter, `:stopped` if it was already stopped
254
+ # at the time of invocation, `:waited` if it stopped during the
255
+ # timeout period, `:timeout` if it is still running after the
256
+ # timeout, or `:forced` if it was forcibly killed.
250
257
  #
251
258
  def stop! timeout = nil, force: nil
259
+ return :new unless @thread_pool
252
260
  return :stopped if stopped?
253
261
 
254
262
  stop
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Logging
19
- VERSION = "1.10.4".freeze
19
+ VERSION = "1.10.5".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-logging
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.4
4
+ version: 1.10.5
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: 2020-04-20 00:00:00.000000000 Z
12
+ date: 2020-05-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core
@@ -127,14 +127,14 @@ dependencies:
127
127
  requirements:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: '5.10'
130
+ version: '5.14'
131
131
  type: :development
132
132
  prerelease: false
133
133
  version_requirements: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - "~>"
136
136
  - !ruby/object:Gem::Version
137
- version: '5.10'
137
+ version: '5.14'
138
138
  - !ruby/object:Gem::Dependency
139
139
  name: minitest-autotest
140
140
  requirement: !ruby/object:Gem::Requirement