web47command 0.0.3 → 0.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ec04e840dab56171aaa7e29aab015888e461d1f2487f53dc854b86baebe799f
4
- data.tar.gz: 2cf3644fbd84c46a0caaf5c271ebe293a4a608181bc3ef7ecf189a6090490e63
3
+ metadata.gz: f7a5d228fd6711bc83e6321edb8488455218fd1c88fd0f2002b28b56806515a5
4
+ data.tar.gz: 32044f2e427b2d62e50f35801291ca26a32bf875cf066267f7592602a4059758
5
5
  SHA512:
6
- metadata.gz: 1840d4ca423bb53b9b86e091f51ee146a444b7bf44dc2904a073f3e9fb8a3cbca247a93dc4d409177f83098ae4ae1ab8e371918f59671e524e054b0aecdb8180
7
- data.tar.gz: 4fe65ce773a652b7cd77954fa35a2aff89d58e54dc00b72ef701f10303b6186b86595b6489560e75132610edc48fa935510702f8fe447d85fe31668a9d78d510
6
+ metadata.gz: d642520ec8e7aa6dab40703a8228cd05917f87a4a6ad2ba606fb8434dbd59497f96b8d30682e13f26a5356c5c5401635ff925b706b9061954fe078baeb40f6fe
7
+ data.tar.gz: aadce6c8f98a4d7ef683d4c0591be8371bfeae8fe5236a0c366a8b5a6238a4ca6c642d2275cca8bc87d5904b497dd06cb583f912588d608311bcd889d9f060d7
@@ -25,15 +25,25 @@ class CommandJob
25
25
  field :max_retries, type: Integer, default: 5
26
26
  field :result, type: String
27
27
  field :error_message, type: String
28
+ field :started_at, type: Time
29
+ field :finished_at, type: Time
28
30
  #
29
31
  # Relationships
30
32
  #
31
33
  has_many :logs, class_name: 'CommandJobLog', dependent: :destroy
34
+ belongs_to :started_by, class_name: 'User', optional: true
32
35
  #
33
36
  # Validations
34
37
  #
35
38
  validates :state, inclusion: { in: ALL_STATES }
36
39
 
40
+ #
41
+ # Who started this job
42
+ #
43
+ def display_started_by
44
+ started_by.present? ? started_by.display_name : 'System'
45
+ end
46
+
37
47
  #
38
48
  # Default time to keep a job before auto archiving it
39
49
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Web47command
4
- VERSION = '0.0.3'
4
+ VERSION = '0.0.4'
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.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Schroeder