embulk-output-bigquery 0.4.4 → 0.4.5

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
  SHA1:
3
- metadata.gz: 91bcf30126eef2cbc84d5a3cd49c36b5d34c77c4
4
- data.tar.gz: 781db1df3aa3df45da76ab9fa01f5350c3d2f388
3
+ metadata.gz: 6d60f1c428336993a486d43f7d1afb065503e8d4
4
+ data.tar.gz: 87a27028e74ec601ae71a951ba9634a01384915a
5
5
  SHA512:
6
- metadata.gz: 136a98aaf998311a46deaca30f172bbb4b58406960f41cbf1482ee0396facfc6e7090b2ebe3e267a59413304c79aed6f25d714b03435c8b1f080aa1e8c906dba
7
- data.tar.gz: bfb55a805782a04326403ada2d89b54677db3c93a3b7599478bd38af807f11bd6ba67d87cb98278a7650b9351fec8eb55971a34be703cba6bcbf9147a4d3b081
6
+ metadata.gz: c735a7c4665f2fd6daf1a2c13159c15bc68a31e4b8fc917385ef86757e72b6d9185e69b263d808907d6658409887ec91363a7d8462e7da8ca2a09097fbded503
7
+ data.tar.gz: 5cdda4398d326eb1ad7f2bc1c6f6a73c4db429e59d8f6a8817ac90930b761d07f5f19c141d67db5a2093910172193ad54e3100402584cd39a7827ede33439630
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.4.5 - 2017-04-04
2
+
3
+ * [maintenance] Fix deprecated warning log condition for `timeout_sec`
4
+
1
5
  ## 0.4.4 - 2017-04-04
2
6
 
3
7
  * [maintenance] Support google-api-ruby-client >= v0.11.0
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "embulk-output-bigquery"
3
- spec.version = "0.4.4"
3
+ spec.version = "0.4.5"
4
4
  spec.authors = ["Satoshi Akama", "Naotoshi Seo"]
5
5
  spec.summary = "Google BigQuery output plugin for Embulk"
6
6
  spec.description = "Embulk plugin that insert records to Google BigQuery."
@@ -64,10 +64,10 @@ module Embulk
64
64
  'payload_column' => config.param('payload_column', :string, :default => nil),
65
65
  'payload_column_index' => config.param('payload_column_index', :integer, :default => nil),
66
66
 
67
- 'open_timeout_sec' => config.param('open_timeout_sec', :integer, :default => 300),
68
- 'timeout_sec' => config.param('timeout_sec', :integer, :default => 300), # google-api-ruby-client < v0.11.0
69
- 'send_timeout_sec' => config.param('send_timeout_sec', :integer, :default => 300), # google-api-ruby-client >= v0.11.0
70
- 'read_timeout_sec' => config.param('read_timeout_sec', :integer, :default => 300), # google-api-ruby-client >= v0.11.0
67
+ 'open_timeout_sec' => config.param('open_timeout_sec', :integer, :default => nil),
68
+ 'timeout_sec' => config.param('timeout_sec', :integer, :default => nil), # google-api-ruby-client < v0.11.0
69
+ 'send_timeout_sec' => config.param('send_timeout_sec', :integer, :default => nil), # google-api-ruby-client >= v0.11.0
70
+ 'read_timeout_sec' => config.param('read_timeout_sec', :integer, :default => nil), # google-api-ruby-client >= v0.11.0
71
71
  'retries' => config.param('retries', :integer, :default => 5),
72
72
  'application_name' => config.param('application_name', :string, :default => 'Embulk BigQuery plugin'),
73
73
  'sdk_log_level' => config.param('sdk_log_level', :string, :default => nil),
@@ -23,13 +23,15 @@ module Embulk
23
23
  client.client_options.application_name = @task['application_name']
24
24
  client.request_options.retries = @task['retries']
25
25
  if client.request_options.respond_to?(:timeout_sec)
26
- client.request_options.timeout_sec = @task['timeout_sec']
27
- client.request_options.open_timeout_sec = @task['open_timeout_sec']
26
+ client.request_options.timeout_sec = @task['timeout_sec'] || 300
27
+ client.request_options.open_timeout_sec = @task['open_timeout_sec'] || 300
28
28
  else # google-api-ruby-client >= v0.11.0
29
- Embulk.logger.warn { "embulk-output-bigquery: timeout_sec is deprecated in google-api-ruby-client >= v0.11.0. Use read_timeout_sec instead" }
30
- client.client_options.open_timeout_sec = @task['open_timeout_sec'] # default: 60
31
- client.client_options.send_timeout_sec = @task['send_timeout_sec'] # default: 120
32
- client.client_options.read_timeout_sec = @task['read_timeout_sec'] || @task['timeout_sec'] # default: 60
29
+ if @task['timeout_sec']
30
+ Embulk.logger.warn { "embulk-output-bigquery: timeout_sec is deprecated in google-api-ruby-client >= v0.11.0. Use read_timeout_sec instead" }
31
+ end
32
+ client.client_options.open_timeout_sec = @task['open_timeout_sec'] || 300 # default: 60
33
+ client.client_options.send_timeout_sec = @task['send_timeout_sec'] || 300 # default: 120
34
+ client.client_options.read_timeout_sec = @task['read_timeout_sec'] || @task['timeout_sec'] || 300 # default: 60
33
35
  end
34
36
  Embulk.logger.debug { "embulk-output-bigquery: client_options: #{client.client_options.to_h}" }
35
37
  Embulk.logger.debug { "embulk-output-bigquery: request_options: #{client.request_options.to_h}" }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-output-bigquery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Satoshi Akama