fanforce-workers 0.6.1 → 0.6.2
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/fanforce/workers/version.rb +1 -1
- data/lib/fanforce/workers/workers.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzliMjBjZGVkNzI0NGFhOWRmNWQ4YjliOWYwNWY3OWRkN2U5ZjMyYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzVmNDU3YjBiYzhmNTVkNDM2ZTEzNzhhODQ0MGUzMjJkODg1YmM0MA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjA0ZmRiNGNkMzViNGQ1MTg0YjYxMDg4OTcxMmM0OTAxMTg2NjM1NmEwZjdl
|
10
|
+
N2I5NTFmOGQxYmNmOTY0ZWYwNDMyMDY5NTM4NGEwYWIxZGIyMmRjNjQ3Zjk2
|
11
|
+
NDRkMmVjNzM5NjUxOTQxMGYxZGRhYzc0ODQ1YzEyN2U4OWUyOWM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MGFiNDBjNzIxODI0ODUxNGFhYzY5MGUxZTkxYmE0OGU1YzExYjAwYzM4YjBj
|
14
|
+
OGIwZjBhMmYxY2E3MzY5ZTgyOWE2YTgzMzYyYTM4NDA0MzJiNjc5N2JjNDRi
|
15
|
+
MWQ1ZDI3YzgyMTI5NzY0NmZmNWY4NjJhZDQ5ZjExMWQyYzkzM2Y=
|
@@ -22,7 +22,7 @@ class Fanforce::Workers
|
|
22
22
|
def add_error(queue_id, error)
|
23
23
|
require 'uuidtools'
|
24
24
|
details_id = UUIDTools::UUID.random_create
|
25
|
-
iron_cache.
|
25
|
+
iron_cache.cache("#{queue_id}-ERRORS").put(details_id, error.to_json)
|
26
26
|
iron_mq.queue("#{queue_id}-ERRORS").post({
|
27
27
|
details_id: details_id,
|
28
28
|
exception: truncate(error[:exception]),
|
@@ -41,12 +41,12 @@ class Fanforce::Workers
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def error_details(queue_id, details_id)
|
44
|
-
cache = iron_cache.
|
44
|
+
cache = iron_cache.cache("#{queue_id}-ERRORS").get(details_id)
|
45
45
|
MultiJson.load(cache.body, :symbolize_keys => true)
|
46
46
|
end
|
47
47
|
|
48
48
|
def retry_error(queue_id, msg_id, details_id)
|
49
|
-
cache = iron_cache.
|
49
|
+
cache = iron_cache.cache("#{queue_id}-ERRORS").get(details_id)
|
50
50
|
cache_data = MultiJson.load(cache.body, :symbolize_keys => true)
|
51
51
|
enqueue(queue_id, cache_data[:params], cache_data[:retries] + 1)
|
52
52
|
|