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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YWUzZTczY2JmYmI2NzM4MTM1ZjUyMGYzOTI4MzcxMWNiMzYwMjM4Yw==
4
+ NGMwN2NmMDVhZjhjNzVlMjE3MWY4OTFmNmEwYWUyNDk5NTllOTFiZg==
5
5
  data.tar.gz: !binary |-
6
- NWYzMjg2NzcxMWNlNTk2YTU5NzcyNWQ5MmE2NDFmMTY4ZmYyZWM5Mw==
6
+ NGEyNTA5MjEzZjA2YTczYjE2NGM2OTFkNjA1Yzk4NWYzYzk1ZDg3ZQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YzE2YmZiNDY2MmI1MWMwZDM2NDJhZTI1Zjk3NWVlMTM1OWRlZWZlZDhjNDMy
10
- YjEzMTc5YzM3MjRiOTJhNmQ0NmUyOWFlZTkxM2Y5MGNiZDVhMjU1MmZkMjg2
11
- NTRmZmRmYWJlNDI3NDM2YWU2MDM1NTAwZWYwNjI0MTk3YzQ0OTY=
9
+ NGVmZjYxOTE1MDE2NTJkYjZhNzdiZGQzYmQ1Y2I3N2UzY2RkZmE5OGJjZWQy
10
+ YTkzY2U4YWUwNTFiNTYyYzA3MDQzNzlmNmZiZTM2ZTI0NTNmMTNhZWNiYzQ1
11
+ YTE1MGU0MmJmYWQyNTk2ZjcwOWU3NDEyYTZmNmJmZWJjYzlmMGE=
12
12
  data.tar.gz: !binary |-
13
- YjU0MDhiMWZkYmUwNjk3YmM4ZWE0NzFkYTI4YmFjYWYyOTA0MmQzZjA0ODZl
14
- NDg2OWQ2M2RmMjJmZDM1MTAwYWUzZTlmYzY1NWMxNGRhNTg1Y2JjZWM3OTA1
15
- ZmFjNWNmYmNkZWNkY2Y4M2M0MGExZGJmODZkZmFlMmJmYzAyY2E=
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
- #payload = (payload.is_a?(Hash) or payload.is_a?(Array)) ? payload.to_json : payload.to_s
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
 
@@ -1,5 +1,5 @@
1
1
  class Fanforce
2
2
  module Workers
3
- VERSION = '0.0.4.pre'
3
+ VERSION = '0.0.4.pre2'
4
4
  end
5
5
  end
@@ -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
- #iron_mq.queue(init_params['worker_id']).poll do |msg|
23
- # run_worker(msg, 0)
24
- #end
16
+ (msg.nil?) ? (return) : run_worker(msg, 0)
25
17
  end
26
18
 
27
19
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fanforce-workers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4.pre
4
+ version: 0.0.4.pre2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caleb Clark