web47command 0.0.3 → 0.0.4
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 +10 -0
- 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: f7a5d228fd6711bc83e6321edb8488455218fd1c88fd0f2002b28b56806515a5
|
4
|
+
data.tar.gz: 32044f2e427b2d62e50f35801291ca26a32bf875cf066267f7592602a4059758
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
#
|
data/lib/web47command/version.rb
CHANGED