rb_snowflake_client 1.1.3 → 1.1.4

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: cc9cf812a682100ea6d9ac3a84156aa202342fa66e335e2c972ef50adc4234b8
4
- data.tar.gz: 549c76f63232f130dcc0f810335023612e7c198d51b6cae2911e3582027157b5
3
+ metadata.gz: '06290ff3078af3cd8d969ae39a9a29fc1272c4b3ff722e49d4d5bdc28a78724f'
4
+ data.tar.gz: 7b04238f59bbb34ce3f72db9fd1edb9551adfff299b42b2cc3fb72397c211bec
5
5
  SHA512:
6
- metadata.gz: 70a7c21d0ddcc12c64281363177c7f31e1f9b88a089fb04ae36700d2140828c0bfee4d0acb557ce823a867875b34d89d426e63ad4e6ad9d3a7646111d030f3e1
7
- data.tar.gz: a4652f0539d923f71bffcffab0bcf212742cc8d174756d41b231869c8def8330449f5eba6dbae9aa99293208efbde57e894c76e34bbac9404b27b152492137ec
6
+ metadata.gz: 52e50c1a4b0f89503c9972fba9a410dcdbd3d5428e6d9c2cd6f25d3d6fb2dc637d300f3dc260ae61cb4fe7105d203e39f3bc8d1435bfed5773d298113171c8d1
7
+ data.tar.gz: a962f2c4e87ce35347bb5320092ac7f6fa14a0ee00f18b821b0b2703ca95ab69a4027b7441d3150b2a2ebe26cbe93be253bfd6c04ed9245a14ca490da1d28111
@@ -33,7 +33,7 @@ jobs:
33
33
  SNOWFLAKE_URI: ${{ secrets.SNOWFLAKE_URI }}
34
34
  SNOWFLAKE_ORGANIZATION: ${{ secrets.SNOWFLAKE_ORGANIZATION }}
35
35
  SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }}
36
- SNOWFLAKE_DEFAULT_WAREHOUSE: $${{ secrets.SNOWFLAKE_DEFAULT_WAREHOUSE }}
36
+ SNOWFLAKE_DEFAULT_WAREHOUSE: ${{ secrets.SNOWFLAKE_DEFAULT_WAREHOUSE }}
37
37
  SNOWFLAKE_USER: ${{ secrets.SNOWFLAKE_USER }}
38
38
  SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }}
39
39
  SNOWFLAKE_PRIVATE_KEY: ${{ secrets.SNOWFLAKE_CLIENT_TEST_PRIVATE_KEY }}
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rb_snowflake_client (1.1.3)
4
+ rb_snowflake_client (1.1.4)
5
5
  concurrent-ruby (>= 1.2)
6
6
  connection_pool (>= 2.4)
7
7
  dotenv (>= 2.8)
@@ -9,31 +9,31 @@ module RubySnowflake
9
9
  result[0] = statement_json_body["data"]
10
10
 
11
11
  thread_pool = Concurrent::FixedThreadPool.new(num_threads)
12
- futures = []
13
- partitions.each_with_index do |partition, index|
14
- next if index == 0 # already have the first partition
15
- futures << Concurrent::Future.execute(executor: thread_pool) do
16
- [index, retreive_proc.call(index)]
12
+ partitions
13
+ .each_with_index.map do |partition, index|
14
+ next if index == 0 # already have the first partition
15
+ [index, Concurrent::Future.execute(executor: thread_pool) { retreive_proc.call(index) }]
17
16
  end
18
- end
19
- futures.each do |future|
20
- if future.rejected?
21
- if future.reason.is_a? RubySnowflake::Error
22
- raise future.reason
23
- else
24
- raise ConnectionStarvedError.new(
25
- "A partition request timed out. This is usually do to using the client in" \
26
- "multiple threads. The client uses a connection thread pool and if too many" \
27
- "requests are all done in threads at the same time, threads can get starved" \
28
- "of access to connections. The solution for this is to either increase the " \
29
- "max_connections parameter on the client or create a new client instance" \
30
- "with it's own connection pool to snowflake per thread. Rejection reason: #{future.reason.message}"
31
- )
17
+ .each do |entry|
18
+ next if entry.nil? # 0th index
19
+
20
+ index, future = entry
21
+ if future.rejected?
22
+ if future.reason.is_a? RubySnowflake::Error
23
+ raise future.reason
24
+ else
25
+ raise ConnectionStarvedError.new(
26
+ "A partition request timed out. This is usually do to using the client in" \
27
+ "multiple threads. The client uses a connection thread pool and if too many" \
28
+ "requests are all done in threads at the same time, threads can get starved" \
29
+ "of access to connections. The solution for this is to either increase the " \
30
+ "max_connections parameter on the client or create a new client instance" \
31
+ "with it's own connection pool to snowflake per thread. Rejection reason: #{future.reason.message}"
32
+ )
33
+ end
32
34
  end
35
+ result[index] = future.value
33
36
  end
34
- index, partition_data = future.value
35
- result[index] = partition_data
36
- end
37
37
  result
38
38
  end
39
39
  end
@@ -1,3 +1,3 @@
1
1
  module RubySnowflake
2
- VERSION = "1.1.3"
2
+ VERSION = "1.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rb_snowflake_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rinsed
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-09 00:00:00.000000000 Z
11
+ date: 2024-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby