fanforce-worker 0.18.0 → 0.18.1
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 +4 -4
- data/lib/fanforce/worker/errors.rb +4 -1
- data/lib/fanforce/worker/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0830db9b002626f0322a04e80875636e6989e550
|
4
|
+
data.tar.gz: 94d985258f677d87b52c0db1ac344fe3351d3d0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80dd1579055722ffddf44d43c0de75fcc900f98ec4e2ff8b67529e77ac0cf899da015159a9c6ce35964cd63cd1788a6d36981236eac3e9fbb7856805e715320d
|
7
|
+
data.tar.gz: 225647e9950ee6ed15a02cbefd7ce3f0039f73d902cb77eb281a18ad8fc1bd0f603364916694ce73e902d926e1cb60aed54abb199afb696f7174264589849147
|
@@ -38,6 +38,7 @@ class Fanforce::Worker::Errors
|
|
38
38
|
error_id = UUIDTools::UUID.random_create.to_s
|
39
39
|
error = {
|
40
40
|
error_id: error_id,
|
41
|
+
class: Fanforce::Worker,
|
41
42
|
exception: e.class.name,
|
42
43
|
http_code: (e.code if e.respond_to?(:code)),
|
43
44
|
message: e.message,
|
@@ -47,7 +48,8 @@ class Fanforce::Worker::Errors
|
|
47
48
|
raw_json: job_data[:params].to_json,
|
48
49
|
env_vars: worker_env.to_json,
|
49
50
|
retries: job_data[:retries],
|
50
|
-
curl_command: (e.curl_command if e.respond_to?(:curl_command))
|
51
|
+
curl_command: (e.curl_command if e.respond_to?(:curl_command)),
|
52
|
+
iron: {token: Fanforce::Worker.iron_token, project_id: Fanforce::Worker.iron_project_id}
|
51
53
|
}
|
52
54
|
redis.rpush("ERRORS:#{queue_id}", error_id)
|
53
55
|
redis.hmset("ERRORS:#{queue_id}:#{error_id}", error.flatten)
|
@@ -138,6 +140,7 @@ class Fanforce::Worker::Error
|
|
138
140
|
def self.retry(queue_id, raw_error)
|
139
141
|
error = format(raw_error.symbolize_keys)
|
140
142
|
params = MultiJson.load(v, symbolize_keys: true) rescue {}
|
143
|
+
Fanforce::Worker.set_config(iron_token: params[:iron][:token], iron_project_id: params[:iron][:project_id])
|
141
144
|
Fanforce::Worker.enqueue(queue_id, params, :retries => error[:retries] + 1)
|
142
145
|
delete(:queue_id, error[:_id])
|
143
146
|
end
|