barbeque 1.4.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/barbeque/job_executions_controller.rb +11 -2
- data/app/controllers/barbeque/job_retries_controller.rb +7 -3
- data/app/models/barbeque/job_execution.rb +4 -0
- data/app/views/barbeque/job_executions/show.html.haml +1 -1
- data/app/views/barbeque/job_retries/show.html.haml +1 -1
- data/config/routes.rb +1 -1
- data/lib/barbeque/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6b2851abd5afe48390d9cc74057bb8364b354fa
|
4
|
+
data.tar.gz: abd05db89ddd0ca3cdb0561741c9d480c667543c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 353ff01f793a236c9bdaccdfdcf989b294fed731dfe753c81a4e0526cd83e28fda01fff881858dbb0725156cb71e8ee6886942936d13edadc28cf290fe7095cd
|
7
|
+
data.tar.gz: 03d100039d9f126275fd3bf7325d72a0d1a3d68f2bf4511dcd4c230e6c110f1280331f89ac8a3a8d8f74d682b0463e7c05baa7df10bd659d70ffb8718ce4135a
|
@@ -1,12 +1,21 @@
|
|
1
1
|
class Barbeque::JobExecutionsController < Barbeque::ApplicationController
|
2
|
+
ID_REGEXP = /\A[0-9]+\z/
|
3
|
+
|
2
4
|
def show
|
3
|
-
|
5
|
+
if ID_REGEXP === params[:message_id]
|
6
|
+
job_execution = Barbeque::JobExecution.find_by(id: params[:message_id])
|
7
|
+
if job_execution
|
8
|
+
redirect_to(job_execution)
|
9
|
+
return
|
10
|
+
end
|
11
|
+
end
|
12
|
+
@job_execution = Barbeque::JobExecution.find_by!(message_id: params[:message_id])
|
4
13
|
@log = @job_execution.execution_log
|
5
14
|
@job_retries = @job_execution.job_retries.order(id: :desc)
|
6
15
|
end
|
7
16
|
|
8
17
|
def retry
|
9
|
-
@job_execution = Barbeque::JobExecution.
|
18
|
+
@job_execution = Barbeque::JobExecution.find_by!(message_id: params[:job_execution_message_id])
|
10
19
|
raise ActionController::BadRequest unless @job_execution.retryable?
|
11
20
|
|
12
21
|
result = Barbeque::MessageRetryingService.new(message_id: @job_execution.message_id).run
|
@@ -1,9 +1,13 @@
|
|
1
1
|
class Barbeque::JobRetriesController < Barbeque::ApplicationController
|
2
2
|
def show
|
3
|
-
@job_execution = Barbeque::JobExecution.find(params[:job_execution_id])
|
4
|
-
@execution_log = @job_execution.execution_log
|
5
|
-
|
6
3
|
@job_retry = Barbeque::JobRetry.find(params[:id])
|
4
|
+
@job_execution = @job_retry.job_execution
|
5
|
+
|
6
|
+
if params[:job_execution_message_id] != @job_execution.message_id
|
7
|
+
redirect_to([@job_execution, @job_retry])
|
8
|
+
end
|
9
|
+
|
10
|
+
@execution_log = @job_execution.execution_log
|
7
11
|
@retry_log = @job_retry.execution_log
|
8
12
|
end
|
9
13
|
end
|
@@ -5,7 +5,7 @@
|
|
5
5
|
%li= link_to('Home', root_path)
|
6
6
|
%li= link_to(job_definition.app.name, app_path(job_definition.app.id))
|
7
7
|
%li= link_to(job_definition.job, job_definition_path(job_definition.id))
|
8
|
-
%li.active
|
8
|
+
%li.active #{@job_execution.message_id}
|
9
9
|
|
10
10
|
.row
|
11
11
|
.col-sm-7
|
@@ -6,7 +6,7 @@
|
|
6
6
|
%li= link_to('Home', root_path)
|
7
7
|
%li= link_to(job_definition.app.name, app_path(job_definition.app.id))
|
8
8
|
%li= link_to(job_definition.job, job_definition_path(job_definition.id))
|
9
|
-
%li= link_to(
|
9
|
+
%li= link_to(job_execution.message_id, job_execution_path(job_execution))
|
10
10
|
%li.active ##{@job_retry.id}
|
11
11
|
|
12
12
|
.row
|
data/config/routes.rb
CHANGED
data/lib/barbeque/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: barbeque
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Kokubun
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: adminlte2-rails
|