bigquery_migration 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/bigquery_migration/bigquery_wrapper.rb +11 -4
- data/lib/bigquery_migration/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cc3b6f5ad69666d2dec7c19ba97cbafecd8f74a
|
4
|
+
data.tar.gz: 490f4b4c6dd4801771de9296d9907a90ea5f43b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b486f63c1e1119fc8061308d073559d88cf006dcb935c73dd023b96ae2b783a58ef7f4f2f4717ed30e72f6536c8c46335430f0e0fa993343fbf1781397ef3e61
|
7
|
+
data.tar.gz: 2c36c1a2a889d7a8137139bd6ec1ca1900b2e5d8129ab6b3a073c206b5ca2831cd3fbb912c8b16fe84302baba63a6c0b90e607c7da7dc8aa7e301763fa22dfc6
|
data/CHANGELOG.md
CHANGED
@@ -53,8 +53,6 @@ class BigqueryMigration
|
|
53
53
|
end
|
54
54
|
|
55
55
|
config[:retries] ||= 5
|
56
|
-
config[:timeout_sec] ||= 300
|
57
|
-
config[:open_timeout_sec] ||= 300
|
58
56
|
end
|
59
57
|
|
60
58
|
def project
|
@@ -90,8 +88,17 @@ class BigqueryMigration
|
|
90
88
|
|
91
89
|
client = Google::Apis::BigqueryV2::BigqueryService.new
|
92
90
|
client.request_options.retries = config[:retries]
|
93
|
-
client.request_options.
|
94
|
-
|
91
|
+
if client.request_options.respond_to?(:timeout_sec)
|
92
|
+
client.request_options.open_timeout_sec = config[:open_timeout_sec] || 300
|
93
|
+
client.request_options.timeout_sec = config[:timeout_sec] || 300
|
94
|
+
else # google-api-ruby-client >= v0.11.0
|
95
|
+
if config[:timeout_sec]
|
96
|
+
logger.warn { "timeout_sec is deprecated in google-api-ruby-client >= v0.11.0. Use read_timeout_sec instead" }
|
97
|
+
end
|
98
|
+
client.client_options.open_timeout_sec = config[:open_timeout_sec] || 300 # default: 60
|
99
|
+
client.client_options.send_timeout_sec = config[:send_timeout_sec] || 300 # default: 120
|
100
|
+
client.client_options.read_timeout_sec = config[:read_timeout_sec] || config[:timeout_sec] || 300 # default: 60
|
101
|
+
end
|
95
102
|
logger.debug { "client_options: #{client.client_options.to_h}" }
|
96
103
|
logger.debug { "request_options: #{client.request_options.to_h}" }
|
97
104
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bigquery_migration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-api-client
|
@@ -199,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
199
199
|
version: '0'
|
200
200
|
requirements: []
|
201
201
|
rubyforge_project:
|
202
|
-
rubygems_version: 2.5.
|
202
|
+
rubygems_version: 2.5.2
|
203
203
|
signing_key:
|
204
204
|
specification_version: 4
|
205
205
|
summary: Migrate BigQuery table schema
|