redshift-connector 4.3.2 → 4.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: b12a5bb9e0027d0251a3d3e98766d60c1a7a2bf1
4
- data.tar.gz: 2e27ed62452041a2dd6bac8471014bdbf4702ef6
3
+ metadata.gz: 5fad88bacc8b957a0998671cf67e42f78875885a
4
+ data.tar.gz: 6400dca6b09e108a07e55dee70ace8837f0c835b
5
5
  SHA512:
6
- metadata.gz: 2ff4c494a726ae8749e1f3e3e13bfa070908e79aba4c037742117b5afb500a27ed84474d43a65ea6a2d57b12bfdf379b6126c3a1d76bf3962e625bee419efea7
7
- data.tar.gz: 702273bc9689811b99345cd4fa685dd0916252a6695e462201323b77224809deb95dfc9a663076b9a54b1dd4ca1c7abc724ff29faf29d759ad4f9559ec400f77
6
+ metadata.gz: d497cb031811c9f8b97ddfc021ab87dd77fceae0b27de3bb3e3453bb4c0e79cdb478f467ccf0a7b1edfa02aa3a010bcead744f55b5dfa28d98c9b24f4c96ea96
7
+ data.tar.gz: 48287e7d2aca4294d4b940388f4545bb9b3dc010b1ff4a014acfe01b8d220208b53a54e25a0d5e311b769d7254d985fe6f07fa02ae9f06f3a50776ddeb97828a
@@ -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 = '4.3.2'
2
+ VERSION = '4.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: 4.3.2
4
+ version: 4.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Minero Aoki