fanforce-worker 0.13.0 → 0.13.1

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
- MTY3MzU4YWQ0N2NlYjRlNmY0YTdiZWY2MmY5MzEyODA2YjE3NmZmZQ==
4
+ Yjk1NjVjZTQyMWIyNGQ3N2UzMTI3OTM1OTI5ZDBkYWI2NzRhZTgyYg==
5
5
  data.tar.gz: !binary |-
6
- NWYzMDZkNThlMzFhODk5NTk3MTFlOGYzNzcyZGE5MTQ4Y2UxMzkyZQ==
6
+ YTA4OWM0NzIyNGYyMmQyMmVmZWZjN2U4OGU0NDVlNmVhODMxOTRmNA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NzRmNzNhNTM0ZTk1YTQ2NGU0ZjBmZTJlNzRlMWQ4NmIxNzQzZDM1M2U2Y2I1
10
- MjFjZDFlYjk1YjExN2IwMTgxZDdlYWVhZTg0NGZhZDg2ODdjZGQ2NGM5MzNm
11
- ODBjMTBjMzYwYmIwMjY1YzgzNWFjNWI1YmFlYjQyZGRjMjAwZmE=
9
+ NTliZDE3ZWU0NTk3ODYxNDdjM2U0NDRhMGVhZDdkYmIxYjNjMjczZjBmZjFj
10
+ ODM5OWU2MTU2NjAwMDQ2ODYyNmU5MDg2MjYzMTM2MzdlZWEyMTdiYmQ2Yzll
11
+ NTIxNjVlNzc3NDA1NTJiM2FlYzYwMzc1Y2YwODU2YjhjNjg3MGE=
12
12
  data.tar.gz: !binary |-
13
- NjhlY2ZkOGZmOTM1YmFjZDk3MzZlNDkxNjY5M2JhOTRkN2I5MTFkZTY1Mzlj
14
- YzMzYjliYTcwZDZhZDY0NWNjNzQxM2MwMzFkMTUyYzFkYTc2MDkwYmQ4MWUw
15
- ZWZmMjAzMzdhZjJmMDcyNGRhNDRlYTc3NWRiYzdjYjNkNGNhYzU=
13
+ MTRiM2Q0ZjU5ZjhhNzM5MDVjZTYwZjY2YjMyMzg0NWUwNzJmODQ4NDgwMTY0
14
+ NDViZDc3YmEwZjRjMTdlMzBiYTkzN2M3NWRlYmZiYjhkMTFkOWZmOGE0Y2Iy
15
+ MDIwOTk1OWY5NmIzMmIzZmIwZmI2OTAwNzg1YTRkNDMxMjg0YTE=
@@ -1,5 +1,5 @@
1
1
  class Fanforce
2
2
  class Worker
3
- VERSION = '0.13.0'
3
+ VERSION = '0.13.1'
4
4
  end
5
5
  end
@@ -28,6 +28,7 @@ class Fanforce::Worker
28
28
  iron_cache.cache("#{queue_id}-ERRORS").put(details_id, error.to_json)
29
29
  iron_mq.queue("#{queue_id}-ERRORS").post({
30
30
  details_id: details_id,
31
+ http_code: error[:http_code],
31
32
  exception: truncate(error[:exception]),
32
33
  message: truncate(error[:message].to_s),
33
34
  params: truncate(error[:params].to_json),
@@ -44,6 +45,7 @@ class Fanforce::Worker
44
45
  puts '-----------------------------------------------------'
45
46
  puts 'JOB ERROR:'
46
47
  puts "details_id: #{details_id}"
48
+ puts "http_code: #{error[:http_code]}"
47
49
  puts "exception: #{truncate(error[:exception])}"
48
50
  puts "message: #{truncate(error[:message].to_s)}"
49
51
  puts "params: #{truncate(error[:params].to_json)}"
@@ -142,6 +144,7 @@ class Fanforce::Worker
142
144
  end
143
145
 
144
146
  def self.run(worker_data, &code_block)
147
+ puts 'LOADING ENV...'
145
148
  load_env
146
149
  require 'iron_mq'
147
150
  require 'iron_cache'
@@ -155,12 +158,12 @@ class Fanforce::Worker
155
158
  job_num = 0
156
159
  puts 'PROCESSING...'
157
160
  while (Time.now - LOAD_TIME) < 1800 and (job = queue.get(timeout: 3600)) do
158
- puts "JOB #{job_num+=1}: #{job.body}"
161
+ puts "- JOB #{job_num+=1}: #{job.body}"
159
162
  run_job job, &code_block
160
163
  self.delete_job
161
164
  end
162
165
  self.delete_job
163
- puts 'DONE'
166
+ puts " FINISHED JOB #{job_num+=1}"
164
167
  end
165
168
 
166
169
  def self.retry(options)
@@ -186,6 +189,7 @@ class Fanforce::Worker
186
189
  return
187
190
  end
188
191
  error = task_data.merge(
192
+ http_code: e.code,
189
193
  exception: e.class.name,
190
194
  message: e.message,
191
195
  backtrace: e.backtrace,
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.13.0
4
+ version: 0.13.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: 2013-10-11 00:00:00.000000000 Z
11
+ date: 2013-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iron_mq