mass_record 0.0.3 → 0.0.3.1
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 +4 -4
- data/lib/mass_record/version.rb +1 -1
- data/lib/mass_record.rb +4 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2274b5908e73c6ef4979b62e286b4e4ff45aa4d4
|
4
|
+
data.tar.gz: 9bfb8204e07590ccf17f68616b8b8555ab9387dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 593872b1c3b26944cbfb7b6ba7015ca45ff5c77c2f3a86bb6d25c69ac8914f43df073a46f6176eb25cd3ae3af25ad8b03f99b054a667f05831cb5950c0c8d500
|
7
|
+
data.tar.gz: 3a9162c425dc5f785d05dc6c7c6ba7256624b1442d8aa2e396fa2eaed95f87bcec05efa6d5ac46742133462b2bc676b9447bb49dfdf085459afeaecd4cca90f7
|
data/lib/mass_record/version.rb
CHANGED
data/lib/mass_record.rb
CHANGED
@@ -39,11 +39,12 @@ module MassRecord
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
+
# TODO: add logic to append the data if the filename already exists
|
42
43
|
# accepts an array of objects with the option to specify what rails operation to perform
|
43
44
|
def queue_for_quick_query object_array,
|
44
45
|
operation: :save,
|
45
46
|
folder:{queued:path[:queued_queries]},
|
46
|
-
file_tag:Time.now.strftime("%Y%m%d%H%M%S").to_s,
|
47
|
+
file_tag:Time.now.strftime("%Y%m%d%H%M%S%L").to_s,
|
47
48
|
key:{
|
48
49
|
table: "table",
|
49
50
|
operation: "operation",
|
@@ -52,7 +53,7 @@ module MassRecord
|
|
52
53
|
|
53
54
|
object_array = [object_array] unless object_array.is_a? Array
|
54
55
|
return false if object_array.blank?
|
55
|
-
|
56
|
+
|
56
57
|
queue = []
|
57
58
|
|
58
59
|
object_array.each do |object|
|
@@ -79,7 +80,7 @@ module MassRecord
|
|
79
80
|
queued:path[:queued_queries],
|
80
81
|
errored:path[:errored_queries],
|
81
82
|
completed:path[:completed_queries]
|
82
|
-
},file_tag:Time.now.strftime("%Y%m%d%H%M%S").to_s
|
83
|
+
},file_tag:Time.now.strftime("%Y%m%d%H%M%S%L").to_s
|
83
84
|
|
84
85
|
files = Dir.foreach(folder[:queued]).collect{|x| x}.keep_if{|y|y=~/\.json$/i}
|
85
86
|
json_objects = []
|