embulk-output-bigquery 0.3.0.pre4 → 0.3.0.pre5

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
  SHA1:
3
- metadata.gz: f6eb9f00dcee50fea8c8a549b9eb365b80dd03e0
4
- data.tar.gz: 5e24073e995335ad82501f9d9f2c954133d33bdd
3
+ metadata.gz: 278ad1e9acdd3c7ae22ef63b9304e4c5fec6871e
4
+ data.tar.gz: a310f2abd73d6cd07808fedc21a11b649a4339ac
5
5
  SHA512:
6
- metadata.gz: 0d6650c1083201768da9867d35f3ce49c7143a0ada83573352ec5717d6c0d214304cd6a2564097c2a4a5b02774f439de5d56a03ef6534b2d93fbc6aa2f018226
7
- data.tar.gz: 51c86baea6ec0742f2358bb5a7689d17745dd9f56384a4e06945dec5d2a0d937d0fc61136de184e5e9a2837c9f30912e1acd706f4db03a60af699494273a15bc
6
+ metadata.gz: 008bc08aaa1b48718b4e0cd6d79b24def61eaa350274560c42212571fe99c7f67dfbd1644186a8d5c3f87de367ccb0d6346b091a994e87bfb31f8d03b42919f3
7
+ data.tar.gz: f0f87a847877b5c70e95088424e657796112d35b044f6b069733446ade00206308ca39d106751750a4a47229c552c3ac91e487dc25b2c5415127c2aeec7ee6a5
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "embulk-output-bigquery"
3
- spec.version = "0.3.0.pre4"
3
+ spec.version = "0.3.0.pre5"
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."
@@ -30,12 +30,19 @@ module Embulk
30
30
  end
31
31
  end
32
32
 
33
+ @mutex = Mutex.new
34
+ @ios = Set.new
35
+
36
+ def self.mutex
37
+ @mutex
38
+ end
39
+
33
40
  def self.reset_ios
34
41
  @ios = Set.new
35
42
  end
36
43
 
37
44
  def self.ios
38
- @ios ||= Set.new
45
+ @ios
39
46
  end
40
47
 
41
48
  def self.paths
@@ -71,8 +78,9 @@ module Embulk
71
78
  io = file_io
72
79
  end
73
80
 
74
- ios = self.class.ios
75
- ios.add(io)
81
+ self.class.mutex.synchronize do
82
+ self.class.ios.add(io)
83
+ end
76
84
 
77
85
  Thread.current[THREAD_LOCAL_IO_KEY] = io
78
86
  end
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.3.0.pre4
4
+ version: 0.3.0.pre5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Satoshi Akama