myreplicator 1.1.62 → 1.1.63

Sign up to get free protection for your applications and to get access to all the features.
data/lib/loader/loader.rb CHANGED
@@ -83,11 +83,11 @@ module Myreplicator
83
83
  end
84
84
  # init load
85
85
  if metadata.export_type == "initial"
86
- Myreplicator::Log.run(:job_type => "loader",
87
- :name => "#{metadata.export_type}_import",
88
- :file => metadata.filename,
89
- :export_id => metadata.export_id) do |log|
90
- if Myreplicator::Loader.transfer_completed? metadata
86
+ if Myreplicator::Loader.transfer_completed? metadata
87
+ Myreplicator::Log.run(:job_type => "loader",
88
+ :name => "#{metadata.export_type}_import",
89
+ :file => metadata.filename,
90
+ :export_id => metadata.export_id) do |log|
91
91
  if metadata.export_to == "vertica"
92
92
  Myreplicator::Loader.incremental_load metadata
93
93
  else
@@ -95,21 +95,24 @@ module Myreplicator
95
95
  end
96
96
  Myreplicator::Loader.cleanup metadata
97
97
  end
98
+ @redis.hset(@load_hash, metadata.filepath, 1)
99
+ else #transporter not done yet, return the file to @load_set
100
+ @redis.sadd(@load_set, metadata.filepath)
98
101
  end
99
- @redis.hset(@load_hash, metadata.filepath, 1)
102
+
100
103
  else #if metadata.export_type == "incremental" # incremental load
101
- #1
102
- Myreplicator::Log.run(:job_type => "loader",
103
- :name => "incremental_import",
104
- :file => metadata.filename,
105
- :export_id => metadata.export_id) do |log|
106
- if Myreplicator::Loader.transfer_completed? metadata
104
+ if Myreplicator::Loader.transfer_completed? metadata
105
+ Myreplicator::Log.run(:job_type => "loader",
106
+ :name => "incremental_import",
107
+ :file => metadata.filename,
108
+ :export_id => metadata.export_id) do |log|
107
109
  Myreplicator::Loader.incremental_load metadata
108
110
  Myreplicator::Loader.cleanup metadata
109
111
  end
112
+ @redis.hset(@load_hash, metadata.filepath, 1)
113
+ else #transporter not done yet, return the file to @load_set
114
+ @redis.sadd(@load_set, metadata.filepath)
110
115
  end
111
- #2
112
- @redis.hset(@load_hash, metadata.filepath, 1)
113
116
  end
114
117
  sleep(2)
115
118
  end # end while
@@ -1,3 +1,3 @@
1
1
  module Myreplicator
2
- VERSION = "1.1.62"
2
+ VERSION = "1.1.63"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: myreplicator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.62
4
+ version: 1.1.63
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-30 00:00:00.000000000 Z
12
+ date: 2013-07-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -358,7 +358,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
358
358
  version: '0'
359
359
  segments:
360
360
  - 0
361
- hash: 372402415782592311
361
+ hash: -3516789411142230801
362
362
  required_rubygems_version: !ruby/object:Gem::Requirement
363
363
  none: false
364
364
  requirements:
@@ -367,7 +367,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
367
367
  version: '0'
368
368
  segments:
369
369
  - 0
370
- hash: 372402415782592311
370
+ hash: -3516789411142230801
371
371
  requirements: []
372
372
  rubyforge_project:
373
373
  rubygems_version: 1.8.24