rseed 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.rdoc +4 -0
- data/lib/rseed/processor.rb +10 -5
- data/lib/rseed/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OWFhM2Q5ZTEyYjhlZjhmM2Y5NzE2MzljODM5ZWQ4YzA3MWZlZTEzMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTQzMGVjZjljMWUyZDI3NDZmYjBhM2RiNmI3ODZiMTg4NjgwZjljOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
M2ZhZGNhMzY5MzQxM2NmNWUyMmFjYzAxY2FlMGNkMjJlYzliNDNhYzA5YjI5
|
10
|
+
NDk1NTc0YzdjMmE2MmVkYzU2ZTNjN2FmZjBkOTFmMmMyOTQxOTc2ZDZmYjgy
|
11
|
+
NGFiMmQzNDJiOTBlNGI5NmYyYWE1ZDJiYjdhMDQ4ZjUwNjQxZTk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjQ4ZWZjNjRjODQ5ZWY0OGEzMzJkMWIzYjc5YTkyZDk1NjE5NTcyOGI2ZDYz
|
14
|
+
N2RkODc4ZDllZmVlN2Q5ZDc4OTRiMjUzNmQyZTE0ZmRkODEwYmExY2RjMDM1
|
15
|
+
MmZiNDVlMmFjMjBmZmRkNjQ4NTIyOTcxNmQ1ODJiZjY1YTlkNDg=
|
data/README.rdoc
CHANGED
@@ -45,6 +45,10 @@ This will cause the generator to create a file with fewer
|
|
45
45
|
|
46
46
|
== The Converter File
|
47
47
|
|
48
|
+
* For some reason that we haven't been able to pin down, Rails struggles with resolving constants within these converters.
|
49
|
+
This does not affect the converters when running in production modes. The workaround for this is to prefix any of your
|
50
|
+
constant names (such as model classes) with :: within your converters. This is done by default when using the generator*
|
51
|
+
|
48
52
|
=== Attribute Options
|
49
53
|
|
50
54
|
* :header
|
data/lib/rseed/processor.rb
CHANGED
@@ -31,6 +31,9 @@ module Rseed
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def deserialize options = {}, &block
|
34
|
+
total_records = 0
|
35
|
+
record_count = 0
|
36
|
+
|
34
37
|
converter.logger = logger
|
35
38
|
adapter.logger = logger
|
36
39
|
adapter.converter = converter
|
@@ -61,10 +64,12 @@ module Rseed
|
|
61
64
|
result[:backtrace] = e.backtrace
|
62
65
|
end
|
63
66
|
|
67
|
+
total_records = meta[:total_records] unless meta[:total_records].nil?
|
68
|
+
record_count = meta[:record_count] unless meta[:record_count].nil?
|
64
69
|
# Calculate the ETA
|
65
|
-
if
|
66
|
-
remaining =
|
67
|
-
tpr = (Time.now - start_time)/
|
70
|
+
if record_count and total_records
|
71
|
+
remaining = total_records - record_count
|
72
|
+
tpr = (Time.now - start_time)/record_count
|
68
73
|
meta[:eta] = remaining * tpr
|
69
74
|
end
|
70
75
|
|
@@ -84,9 +89,9 @@ module Rseed
|
|
84
89
|
yield :error, {success: false, message: 'Preprocessing failed', error: @adapter.error}
|
85
90
|
end
|
86
91
|
rescue Exception => e
|
87
|
-
yield :error, {success: false, message: 'Exception during
|
92
|
+
yield :error, {success: false, message: 'Exception during Processing', error: e.message, backtrace: e.backtrace}
|
88
93
|
end
|
89
|
-
yield :complete
|
94
|
+
yield :complete, {success: true }, {total_records: total_records, record_count: record_count}
|
90
95
|
end
|
91
96
|
end
|
92
97
|
end
|
data/lib/rseed/version.rb
CHANGED