nutella_lib 0.4.22 → 0.4.23
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/VERSION +1 -1
- data/lib/util/mongo_persisted_hash.rb +1 -9
- 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: 3aa2957c3a0f054c78c7c3ac30aa0bf69d7b3ba3
|
|
4
|
+
data.tar.gz: 988dd6d2abf669fa41387f550d7fb1ad890f9b08
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1ac6c90c87e790b10ac40c43e15b214b27024b311f6f17152b671903ce08f113633530dc0fed7f4bb3914d30c26700f62036dfb089b7a03f39fd049a529e338c
|
|
7
|
+
data.tar.gz: 6e5504122ac7bf604ac0733bc41c50c8f3fc7cddbf0a8fe743ea01c0cb9753fb4bb2ea53b23c5fb0011cd791e70da873be91633d0f3812bb29370ef2edf0097a
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.4.
|
|
1
|
+
0.4.23
|
|
@@ -22,15 +22,6 @@ class MongoPersistedHash
|
|
|
22
22
|
# Semaphore for the write on DB synchronization
|
|
23
23
|
@s = Mutex.new
|
|
24
24
|
|
|
25
|
-
Thread.new {
|
|
26
|
-
while sleep 1.0
|
|
27
|
-
@s.synchronize {
|
|
28
|
-
if(defined? @r)
|
|
29
|
-
@collection.find({'_id' => @doc_id}).find_one_and_replace(@r, :upsert => :true)
|
|
30
|
-
end
|
|
31
|
-
}
|
|
32
|
-
end
|
|
33
|
-
}
|
|
34
25
|
end
|
|
35
26
|
|
|
36
27
|
|
|
@@ -135,6 +126,7 @@ class MongoPersistedHash
|
|
|
135
126
|
def store_hash(hash)
|
|
136
127
|
@s.synchronize {
|
|
137
128
|
@r = hash
|
|
129
|
+
@collection.find({'_id' => @doc_id}).find_one_and_replace(@r, :upsert => :true)
|
|
138
130
|
}
|
|
139
131
|
# The store is made in a separate thread
|
|
140
132
|
end
|