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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7a5d228fd6711bc83e6321edb8488455218fd1c88fd0f2002b28b56806515a5
4
- data.tar.gz: 32044f2e427b2d62e50f35801291ca26a32bf875cf066267f7592602a4059758
3
+ metadata.gz: fe79d07bc323bb913a1727fb9d4bc27a170c60ad9b2d48c201a4a041695010ac
4
+ data.tar.gz: 1bff0e46158731ecf948ea5acff168b543c17ed48cef149ea59fb4d0a0a078f8
5
5
  SHA512:
6
- metadata.gz: d642520ec8e7aa6dab40703a8228cd05917f87a4a6ad2ba606fb8434dbd59497f96b8d30682e13f26a5356c5c5401635ff925b706b9061954fe078baeb40f6fe
7
- data.tar.gz: aadce6c8f98a4d7ef683d4c0591be8371bfeae8fe5236a0c366a8b5a6238a4ca6c642d2275cca8bc87d5904b497dd06cb583f912588d608311bcd889d9f060d7
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 fail?
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!!"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Web47command
4
- VERSION = '0.0.4'
4
+ VERSION = '0.0.5'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web47command
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Schroeder