barbeque 0.0.18 → 0.1.0
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/app/controllers/barbeque/job_executions_controller.rb +1 -4
- data/app/controllers/barbeque/job_retries_controller.rb +2 -3
- data/app/views/barbeque/job_executions/show.html.haml +12 -3
- data/app/views/barbeque/job_retries/show.html.haml +12 -3
- data/lib/barbeque/execution_log.rb +2 -0
- data/lib/barbeque/message_handler/job_retry.rb +6 -0
- data/lib/barbeque/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: 4510b6adf348a1bda1e6c35d02826cfa019f0ab3
|
4
|
+
data.tar.gz: 8718974eaadf54ed119d8ef3b7e107117919bc59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9c7801de72f8bd392b19c70adaa9b087638e434b66d75e565a3b7e2db3772545d3e95359d816801dc577e76b771649c1d2bf020648a698cd89a191ed68b8781
|
7
|
+
data.tar.gz: 49d35f54929f3e5906d7b5e673205cb2bdd3f64b8a3e4017a4cd2f43a74305c0b7874e257c0b745cd124350779a5eac3d2bde7e7f471b9c01024987ae091ad69
|
@@ -1,10 +1,7 @@
|
|
1
1
|
class Barbeque::JobExecutionsController < Barbeque::ApplicationController
|
2
2
|
def show
|
3
3
|
@job_execution = Barbeque::JobExecution.find(params[:id])
|
4
|
-
log = @job_execution.execution_log
|
5
|
-
@message = log['message']
|
6
|
-
@stdout = log['stdout']
|
7
|
-
@stderr = log['stderr']
|
4
|
+
@log = @job_execution.execution_log
|
8
5
|
end
|
9
6
|
|
10
7
|
def retry
|
@@ -1,10 +1,9 @@
|
|
1
1
|
class Barbeque::JobRetriesController < Barbeque::ApplicationController
|
2
2
|
def show
|
3
3
|
@job_execution = Barbeque::JobExecution.find(params[:job_execution_id])
|
4
|
-
@
|
4
|
+
@execution_log = @job_execution.execution_log
|
5
5
|
|
6
6
|
@job_retry = Barbeque::JobRetry.find(params[:id])
|
7
|
-
@
|
8
|
-
@stderr = @job_retry.execution_log['stderr']
|
7
|
+
@retry_log = @job_retry.execution_log
|
9
8
|
end
|
10
9
|
end
|
@@ -38,7 +38,10 @@
|
|
38
38
|
%tr
|
39
39
|
%th Message
|
40
40
|
%td
|
41
|
-
|
41
|
+
- if @log
|
42
|
+
%code= @log['message']
|
43
|
+
- else
|
44
|
+
Log was not found.
|
42
45
|
.col-sm-5
|
43
46
|
.box.box-primary
|
44
47
|
.box-header
|
@@ -78,7 +81,10 @@
|
|
78
81
|
Stdout
|
79
82
|
|
80
83
|
.box-body
|
81
|
-
|
84
|
+
- if @log
|
85
|
+
%pre= rinku_auto_link(@log['stdout'])
|
86
|
+
- else
|
87
|
+
Log was not found.
|
82
88
|
|
83
89
|
.col-sm-6
|
84
90
|
.box.box-primary
|
@@ -87,6 +93,9 @@
|
|
87
93
|
Stderr
|
88
94
|
|
89
95
|
.box-body
|
90
|
-
|
96
|
+
- if @log
|
97
|
+
%pre= rinku_auto_link(@log['stderr'])
|
98
|
+
- else
|
99
|
+
Log was not found.
|
91
100
|
|
92
101
|
= link_to 'Back', job_definition_path(@job_execution.job_definition)
|
@@ -35,7 +35,10 @@
|
|
35
35
|
%tr
|
36
36
|
%th Message
|
37
37
|
%td
|
38
|
-
|
38
|
+
- if @execution_log
|
39
|
+
%code= @execution_log['message']
|
40
|
+
- else
|
41
|
+
Execution log was not found.
|
39
42
|
|
40
43
|
.row
|
41
44
|
.col-sm-6
|
@@ -45,7 +48,10 @@
|
|
45
48
|
Stdout
|
46
49
|
|
47
50
|
.box-body
|
48
|
-
|
51
|
+
- if @retry_log
|
52
|
+
%pre= @retry_log['stdout']
|
53
|
+
- else
|
54
|
+
Retry log was not found.
|
49
55
|
|
50
56
|
.col-sm-6
|
51
57
|
.box.box-primary
|
@@ -54,6 +60,9 @@
|
|
54
60
|
Stderr
|
55
61
|
|
56
62
|
.box-body
|
57
|
-
|
63
|
+
- if @retry_log
|
64
|
+
%pre= @retry_log['stderr']
|
65
|
+
- else
|
66
|
+
Retry log was not found.
|
58
67
|
|
59
68
|
= link_to 'Back', job_execution_path(@job_execution)
|
@@ -5,6 +5,8 @@ require 'barbeque/slack_client'
|
|
5
5
|
|
6
6
|
module Barbeque
|
7
7
|
module MessageHandler
|
8
|
+
class MessageNotFound < StandardError; end
|
9
|
+
|
8
10
|
class JobRetry
|
9
11
|
# @param [Barbeque::Message::JobExecution] message
|
10
12
|
# @param [Barbeque::JobQueue] job_queue
|
@@ -70,6 +72,10 @@ module Barbeque
|
|
70
72
|
end
|
71
73
|
|
72
74
|
def job_envs
|
75
|
+
if job_execution.execution_log.nil?
|
76
|
+
raise MessageNotFound.new('failed to fetch retried message')
|
77
|
+
end
|
78
|
+
|
73
79
|
{
|
74
80
|
'BARBEQUE_JOB' => job_execution.job_definition.job,
|
75
81
|
'BARBEQUE_MESSAGE' => job_execution.execution_log['message'],
|
data/lib/barbeque/version.rb
CHANGED