barbeque 0.2.1 → 0.2.2
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c235c801a5847d1f7ee491ead2247b9e3c08845a
|
4
|
+
data.tar.gz: f2157e1f492cba1a78fc8e64d528abb850e144e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08626acefc490c6da1fe8abf979216974743335448aae55404551ae9d9cc43038729b928cef678b51f8f24f7703095b74071863d0f16fb1851432c96da0095e3'
|
7
|
+
data.tar.gz: 299a6c177bf233a04d9bf9fbf6907014cf4663d7cb894459657592e0441030b6af760f90ec8ba89b0d3976cb800f8266d7198b23523723be32cedf29f379f54c
|
@@ -15,12 +15,14 @@ class Barbeque::Api::JobExecutionsController < Barbeque::Api::ApplicationControl
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def require_resource
|
18
|
-
|
18
|
+
model = Barbeque::JobExecution.find_or_initialize_by(message_id: params[:message_id])
|
19
|
+
@resource = Barbeque::Api::JobExecutionResource.new(model, url_options)
|
19
20
|
end
|
20
21
|
|
21
22
|
def create_resource
|
22
23
|
message_id = enqueue_message
|
23
|
-
Barbeque::JobExecution.new(message_id: message_id)
|
24
|
+
model = Barbeque::JobExecution.new(message_id: message_id)
|
25
|
+
@resource = Barbeque::Api::JobExecutionResource.new(model, url_options)
|
24
26
|
end
|
25
27
|
|
26
28
|
# @return [String] id of a message queued to SQS.
|
@@ -32,4 +34,13 @@ class Barbeque::Api::JobExecutionsController < Barbeque::Api::ApplicationControl
|
|
32
34
|
message: params[:message],
|
33
35
|
).run
|
34
36
|
end
|
37
|
+
|
38
|
+
# Link to job_execution isn't available if it isn't dequeued yet
|
39
|
+
def location
|
40
|
+
if @resource.id
|
41
|
+
super
|
42
|
+
else
|
43
|
+
nil
|
44
|
+
end
|
45
|
+
end
|
35
46
|
end
|
@@ -3,5 +3,22 @@ class Barbeque::Api::JobExecutionResource < Barbeque::Api::ApplicationResource
|
|
3
3
|
|
4
4
|
property :status
|
5
5
|
|
6
|
-
|
6
|
+
property :id
|
7
|
+
|
8
|
+
property :html_url, selectable: true
|
9
|
+
|
10
|
+
delegate :message_id, :status, :id, to: :model
|
11
|
+
|
12
|
+
def initialize(model, url_options)
|
13
|
+
super(model)
|
14
|
+
@url_options = url_options
|
15
|
+
end
|
16
|
+
|
17
|
+
def html_url
|
18
|
+
if model.id
|
19
|
+
Barbeque::Engine.routes.url_helpers.job_execution_url(model, @url_options)
|
20
|
+
else
|
21
|
+
nil
|
22
|
+
end
|
23
|
+
end
|
7
24
|
end
|
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: 0.2.
|
4
|
+
version: 0.2.2
|
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-
|
11
|
+
date: 2017-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: adminlte2-rails
|
@@ -387,7 +387,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
387
387
|
version: '0'
|
388
388
|
requirements: []
|
389
389
|
rubyforge_project:
|
390
|
-
rubygems_version: 2.6.
|
390
|
+
rubygems_version: 2.6.10
|
391
391
|
signing_key:
|
392
392
|
specification_version: 4
|
393
393
|
summary: Job queue system to run job with Docker
|