redshift-connector 5.3.2 → 5.4.0

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: 92e4cbc013cea23b354fcd85bc91e320efd234ae
4
- data.tar.gz: b5bbe711725abdf11ba8f138138fee8422fd6822
3
+ metadata.gz: 58ae198b8bba6ce5c279bd67b1e5e9de6d05c007
4
+ data.tar.gz: d403857e6f2439ee654e18537d93bb67a333ab04
5
5
  SHA512:
6
- metadata.gz: 25731aa8fa269ded37717adb36e4d8a6ce81de171c36e6968e3bb1f29aadad93abfe068b6e3509ce70ff820f6f9b196c2ebc66373feded7bea99f945b0d645f7
7
- data.tar.gz: ea26a509da98e7e6cf1fe7247b430db216687f216889d8181a1b5ea353de5d3a77a5bbf4de563f5ea4402c1782f8c57751b8cff167a9e1f7eed8e65cad955fcd
6
+ metadata.gz: 6cb22409f2c133ca2974f4279106615628edd4d12512e7e069a7d140f4d056e7e6470a57a95b85db0065bf763753d6ff3c705d17c7ae475414126d4318389dc2
7
+ data.tar.gz: '049a4bec56136974dfeadcba78564337927b5420acd03d1fd098ff1314ea80ca217764a9ff6b2f53b01eaf8aa8f91b615ac6883f410d3ce2a7919b91a5d257ab'
@@ -116,26 +116,18 @@ module RedshiftConnector
116
116
  not ENV['IMPORT_ONLY']
117
117
  end
118
118
 
119
- def export_forced?
120
- !! (ENV['EXPORT_ONLY'] or ENV['FORCE'])
121
- end
122
-
123
119
  def import_enabled?
124
120
  not ENV['EXPORT_ONLY']
125
121
  end
126
122
 
127
123
  def execute
128
- export(forced: export_forced?) if export_enabled?
124
+ export if export_enabled?
129
125
  import if import_enabled?
130
126
  end
131
127
 
132
- def export(forced: false)
128
+ def export
133
129
  @logger.info "==== export task =================================================="
134
- if not forced and @exporter.completed?
135
- @logger.info "export task is already executed; skip"
136
- else
137
- @exporter.execute
138
- end
130
+ @exporter.execute
139
131
  end
140
132
 
141
133
  def import
@@ -74,19 +74,6 @@ module RedshiftConnector
74
74
  attr_reader :bundle
75
75
  attr_reader :logger
76
76
 
77
- def completed?
78
- @bundle.bucket.object(flag_object_key).exists?
79
- end
80
-
81
- def create_flag_object
82
- @logger.info "TOUCH #{flag_object_key}"
83
- @bundle.bucket.object(flag_object_key).put(body: "OK")
84
- end
85
-
86
- def flag_object_key
87
- "#{File.dirname(@bundle.prefix)}/00completed"
88
- end
89
-
90
77
  def execute
91
78
  @bundle.clear
92
79
  @logger.info "EXPORT #{@query.description} -> #{@bundle.url}*"
@@ -95,7 +82,6 @@ module RedshiftConnector
95
82
  @logger.info "[SQL/Redshift] #{batch_job_label}#{stmt.strip}"
96
83
  conn.execute(batch_job_label + stmt)
97
84
  end
98
- create_flag_object
99
85
  end
100
86
 
101
87
  def batch_job_label
@@ -1,3 +1,3 @@
1
1
  module RedshiftConnector
2
- VERSION = '5.3.2'
2
+ VERSION = '5.4.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redshift-connector
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.2
4
+ version: 5.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Minero Aoki