fanforce-worker 0.21.0 → 0.21.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6a4b28991d50e9ee0dea97df677de5d40a6fce77
4
- data.tar.gz: f0d3d9b6c96b93155d9766cb479181ff7f0d1fbc
3
+ metadata.gz: cf99c7e55486c780a68cca231e3dd8fe881ee05e
4
+ data.tar.gz: f7244e5bfdf9ae11fa932f03e021dbb16c6bb20d
5
5
  SHA512:
6
- metadata.gz: 6a476332bb11bf5a6b333feb2f741511ddec6ea879f1f8c4e3b2a653a02311b0fd3e5ff389086899536e818d818075d986e575dba13b2823e8f1919962fe4b5b
7
- data.tar.gz: 19f62f6e4af99f3df70b264d8265a5e9811ffad1a1b17e7c35f91b0ee45262e05e3b787f2fa8a5fcc595d95f8b89509fd074b2aba11a4ed1af9f98d1ed870100
6
+ metadata.gz: 0c695c59c1e02420925292f92669c738d68f4207e56dfe632946610397977ae15cfea8a24b89e4f614ee17ecdd54b1708cb33ba2678ea2d0638fd35a044fdc33
7
+ data.tar.gz: c56228a5cd8f1069fb9d2616863f2b0989f73f163f6b8130d7e100fd8bcabf70f1dd5d0911f7d27bc65144bf58b67bae9abeb837701e8b971f4ae1418ea2bb11
@@ -7,7 +7,7 @@ class Fanforce::Worker::Errors
7
7
  @@redis = nil
8
8
 
9
9
  def self.redis
10
- @@redis ||= Redis.new(url: Fanforce::Worker.redis_url)
10
+ @@redis ||= Redis.new(url: Fanforce::Worker.redis_url_errorlog)
11
11
  end
12
12
 
13
13
  def self.find(queue_id, error_id)
@@ -141,9 +141,9 @@ class Fanforce::Worker::Error
141
141
 
142
142
  def self.retry(queue_id, raw_error)
143
143
  error = format(raw_error.symbolize_keys)
144
- params = MultiJson.load(error[:raw_json], symbolize_keys: true) rescue {}
144
+ payload = MultiJson.load(error[:raw_json], symbolize_keys: true) rescue {}
145
145
  Fanforce::Worker.set_config(iron_token: error[:iron_token], iron_project_id: error[:iron_project_id])
146
- Fanforce::Worker.enqueue(queue_id, params, :retries => error[:retries] + 1)
146
+ Fanforce::Worker.enqueue(queue_id, payload, :retries => error[:retries] + 1)
147
147
  delete(queue_id, error[:error_id])
148
148
  end
149
149
 
@@ -195,4 +195,5 @@ class Fanforce::Worker::ErrorList
195
195
  end
196
196
  return nil
197
197
  end
198
+
198
199
  end
@@ -1,5 +1,5 @@
1
1
  class Fanforce
2
2
  class Worker
3
- VERSION = '0.21.0'
3
+ VERSION = '0.21.1'
4
4
  end
5
5
  end
@@ -19,14 +19,14 @@ class Fanforce::Worker
19
19
  @@iron[:mq] ||= IronMQ::Client.new(:token => @@iron[:token], :project_id => @@iron[:project_id])
20
20
  end
21
21
 
22
- def self.redis_url
23
- @@redis[:url] || ENV['REDIS_URL_ERRORLOG']
22
+ def self.redis_url_errorlog
23
+ @@redis[:url_errorlog] || ENV['REDIS_URL_ERRORLOG'] || (raise 'No REDIS_URL_ERRORLOG found in ENV')
24
24
  end
25
25
 
26
26
  def self.set_config(obj)
27
27
  @@iron[:token] = obj[:iron_token] if obj[:iron_token]
28
28
  @@iron[:project_id] = obj[:iron_project_id] if obj[:iron_project_id]
29
- @@redis[:url] = obj[:redis_url] if obj[:redis_url]
29
+ @@redis[:url_errorlog] = obj[:redis_url_errorlog] if obj[:redis_url_errorlog]
30
30
  end
31
31
 
32
32
  def self.log
data/test/test_helper.rb CHANGED
@@ -13,7 +13,7 @@ def clean_dbs
13
13
  Fanforce::Worker.set_config(
14
14
  iron_token: 'TF0YNz8na2H_reJ7_EoRnQAeKHM',
15
15
  iron_project_id: '53725dfe0db3ef0005000001',
16
- redis_url: 'redis://localhost:6379/5'
16
+ redis_url_errorlog: 'redis://localhost:6379/5'
17
17
  )
18
18
  Fanforce::Worker.iron_mq.queues.all.each do |queue|
19
19
  queue.delete_queue
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fanforce-worker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.21.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caleb Clark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-11 00:00:00.000000000 Z
11
+ date: 2014-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iron_mq