mongo_mapper_parallel 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/mongo_mapper_parallel.rb +1 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YjNkY2Q4NTkxNjdjYTU3ODEzMDk3YmEyNDhhM2E1OWQ5OWFlMmFhMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NjVlNjZhNzE4ZGUzOTFkMDdjMjZlMjZkMjllMDc2YTk5YTg2NTk0OQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Njk3NTQxYjJkMjUzOTEyZDdhN2RmNTYwNTVlZDVmYmQxZjE5YWUxNjRmMTFl
|
10
|
+
Y2U1MzNmZjIzMzQzZTRkYzgwYjZkMDEwMmFjNTU0ZTZjYjNlMjY2ZDM0NWVh
|
11
|
+
MjkzYjQ3YmZmZDc3MTUyYWMzNjlhZTA2NWUxN2QzMDk3M2U0ZmI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTcyNDM0NDg5Yjc0YTMxMWE0OTM2ZGJiMmZhZmEzNTE2NDZiZDk4NGJjYTI0
|
14
|
+
YzgxYzZhODA2ZjBiOWE3NDEyMDczNzUwZWY3ZDNkMDk3NmQxZTZhZjJjMWQ1
|
15
|
+
YWI1OWU5YmYxNzM0YzdlMmE2OGMxMTNkNmZmM2JhYTViMmJiYTg=
|
@@ -106,9 +106,6 @@ class MongoMapperParallel
|
|
106
106
|
puts "Success".green
|
107
107
|
end
|
108
108
|
|
109
|
-
# Occurs when {#advance} receives an out of bounds percentage
|
110
|
-
class ProgressError < Error; end
|
111
|
-
|
112
109
|
# In case of stalled progress you can skip ahead by a percentage and mark the keys as `completed`.
|
113
110
|
#
|
114
111
|
# @param percentage [Float] how far along you want to advance, a value between 0.0 and 1.0
|
@@ -117,7 +114,7 @@ class MongoMapperParallel
|
|
117
114
|
if percentage.class != Float
|
118
115
|
raise TypeError.new "Can only advance by a Float value."
|
119
116
|
elsif percentage > 1.0 or percentage < 0.0
|
120
|
-
raise
|
117
|
+
raise RangeError.new "Can only advance by a Float between 0.0 and 1.0."
|
121
118
|
end
|
122
119
|
@split_keys[0..(@split_keys.length*percentage).to_i].each {|i| i.completed = true}
|
123
120
|
self
|