web47command 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/app/models/command_job.rb +4 -4
- data/lib/web47command/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe79d07bc323bb913a1727fb9d4bc27a170c60ad9b2d48c201a4a041695010ac
|
4
|
+
data.tar.gz: 1bff0e46158731ecf948ea5acff168b543c17ed48cef149ea59fb4d0a0a078f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a71ca543dc25b1acaffc0bcc18cd905bac6e98f4533c479ee6dc73e672cb996ee0ea491648965b784b7d606e476c757fc1a6091d5068c15a12be974933a368e
|
7
|
+
data.tar.gz: 534b5eebca05b4fe1af682cdb5fad2620cd70c5f43df5a35e0fd8c3f0cd1ef8f694b26bef27199ac875359a8be506c73b048117d0722fae8b35c652e3304e24e
|
@@ -136,7 +136,7 @@ class CommandJob
|
|
136
136
|
end
|
137
137
|
|
138
138
|
def perform
|
139
|
-
if
|
139
|
+
if failed?
|
140
140
|
self.retries = 0
|
141
141
|
self.error_message = 'Retrying'
|
142
142
|
end
|
@@ -151,14 +151,14 @@ class CommandJob
|
|
151
151
|
end
|
152
152
|
|
153
153
|
def run
|
154
|
-
set state: STATE_WIP
|
154
|
+
set state: STATE_WIP, started_at: Time.now.utc
|
155
155
|
# Run the job
|
156
156
|
run!
|
157
|
-
set error_message: '', state: STATE_SUCCESS
|
157
|
+
set error_message: '', state: STATE_SUCCESS, finished_at: Time.now.utc
|
158
158
|
rescue StandardError => error
|
159
159
|
if retries >= max_retries
|
160
160
|
log_error "Unable to run job id: #{id}, done retrying", error
|
161
|
-
set state: STATE_FAIL, error_message: "Failed final attempt: #{error.message}"
|
161
|
+
set state: STATE_FAIL, error_message: "Failed final attempt: #{error.message}", finished_at: Time.now.utc
|
162
162
|
else
|
163
163
|
log_error "Unable to run job id: #{id}, retrying!!", error
|
164
164
|
add_log "Unable to run job: #{error.message}, retrying!!"
|
data/lib/web47command/version.rb
CHANGED