fanforce-workers 0.0.4.pre → 0.0.4.pre2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/fanforce/workers/iron.rb +1 -1
- data/lib/fanforce/workers/version.rb +1 -1
- data/lib/fanforce/workers/worker.rb +1 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NGMwN2NmMDVhZjhjNzVlMjE3MWY4OTFmNmEwYWUyNDk5NTllOTFiZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NGEyNTA5MjEzZjA2YTczYjE2NGM2OTFkNjA1Yzk4NWYzYzk1ZDg3ZQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NGVmZjYxOTE1MDE2NTJkYjZhNzdiZGQzYmQ1Y2I3N2UzY2RkZmE5OGJjZWQy
|
10
|
+
YTkzY2U4YWUwNTFiNTYyYzA3MDQzNzlmNmZiZTM2ZTI0NTNmMTNhZWNiYzQ1
|
11
|
+
YTE1MGU0MmJmYWQyNTk2ZjcwOWU3NDEyYTZmNmJmZWJjYzlmMGE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NDZmZTcyMDFkZjQ1MjY1OGYzYzJmYjVhZGVlN2I3MWE0N2E5ZDFhMzAxMjMx
|
14
|
+
NjUyYzhkNjhhOGI5N2ViMWFjODc3YmMzNmI1Y2ZhNzBjMjQ3MDE0YmJkZjEy
|
15
|
+
Mjc0YzNkMzczZDMwOWFiYjc2NGU4NjE0Yzg1ZWRiNmM1YmMyMmM=
|
@@ -5,7 +5,7 @@ class Fanforce::Workers::Iron
|
|
5
5
|
end
|
6
6
|
|
7
7
|
def queue(queue_id, payload)
|
8
|
-
|
8
|
+
payload = (payload.is_a?(Hash) or payload.is_a?(Array)) ? payload.to_json : payload.to_s
|
9
9
|
@iron_mq.queue(queue_id).post(payload)
|
10
10
|
end
|
11
11
|
|
@@ -10,18 +10,10 @@ class Fanforce::Worker
|
|
10
10
|
|
11
11
|
@init_params = init_params
|
12
12
|
@worker_code = worker_code
|
13
|
-
msg = iron_mq.queue(init_params['worker_id']).get #(timeout: 3600)
|
14
|
-
puts msg
|
15
|
-
puts msg.body
|
16
13
|
|
17
14
|
msg = iron_mq.queue(init_params['worker_id']).get #(timeout: 3600)
|
18
|
-
puts msg
|
19
|
-
puts msg.body
|
20
|
-
|
21
15
|
|
22
|
-
|
23
|
-
# run_worker(msg, 0)
|
24
|
-
#end
|
16
|
+
(msg.nil?) ? (return) : run_worker(msg, 0)
|
25
17
|
end
|
26
18
|
|
27
19
|
|