iron_titan 0.0.1 → 0.0.2
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/README.md +40 -1
- data/lib/iron_titan/api/core_api.rb +12 -9
- data/lib/iron_titan/api/jobs_api.rb +94 -31
- data/lib/iron_titan/api_client.rb +2 -2
- data/lib/iron_titan/api_error.rb +1 -1
- data/lib/iron_titan/configuration.rb +1 -1
- data/lib/iron_titan/models/error.rb +2 -2
- data/lib/iron_titan/models/error_body.rb +2 -2
- data/lib/iron_titan/models/job.rb +18 -5
- data/lib/iron_titan/models/job_array.rb +2 -2
- data/lib/iron_titan/models/job_wrapper.rb +7 -7
- data/lib/iron_titan/models/log.rb +158 -0
- data/lib/iron_titan/models/new_job.rb +6 -4
- data/lib/iron_titan/models/new_job_array.rb +2 -2
- data/lib/iron_titan/version.rb +2 -2
- data/lib/iron_titan.rb +6 -5
- data/spec/api/core_api_spec.rb +100 -0
- data/spec/api/jobs_api_spec.rb +148 -0
- data/spec/models/Error_spec.rb +1 -1
- data/spec/models/Job_spec.rb +11 -1
- data/spec/models/error_body_spec.rb +56 -0
- data/spec/models/job_array_spec.rb +46 -0
- data/spec/models/job_wrapper_spec.rb +46 -0
- data/spec/models/log_spec.rb +46 -0
- data/spec/models/new_job_array_spec.rb +46 -0
- data/spec/models/new_job_spec.rb +96 -0
- metadata +22 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 08b9c5872df45ed6241c58ca9563a93f8ec8fc42
|
4
|
+
data.tar.gz: 12cd3d94d36b49c2a72ad53f374d7abdf5a98a63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7432e649ea8143896efd41b38c18028229edb399596239cca895285f8ff0c9f508d36b074ad25605d087d3c5a8edc63f3c51df120c9d496b9d326ecd37c91373
|
7
|
+
data.tar.gz: 9614c7759f866c5ab1065cc634f790d84165637acdef96da513646e75dfdc18052285f634a7c0fb2455d7b87f80dfec290b2ef90692ab2bde76ab96ad955bdb9
|
data/README.md
CHANGED
@@ -1,10 +1,49 @@
|
|
1
1
|
|
2
2
|
|
3
|
+
## Installation
|
3
4
|
|
5
|
+
```
|
6
|
+
gem install iron_titan
|
7
|
+
```
|
8
|
+
|
9
|
+
Or add `gem "iron_titan"` to your Gemfile.
|
10
|
+
|
11
|
+
## Usage
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
IronTitan.configure do |config|
|
15
|
+
config.host = "192.168.99.100:8080"
|
16
|
+
config.scheme = "http"
|
17
|
+
end
|
18
|
+
|
19
|
+
@titan = IronTitan::JobsApi.new
|
20
|
+
```
|
21
|
+
|
22
|
+
Then use it:
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
# Post a job
|
26
|
+
r = @titan.jobs_post(jobs: [{
|
27
|
+
image: 'treeder/echo:latest',
|
28
|
+
delay: 5,
|
29
|
+
payload: {input: 'Test Input'}.to_json
|
30
|
+
}])
|
31
|
+
input_string = "Test Input"
|
32
|
+
job = r.jobs[0]
|
33
|
+
p job
|
34
|
+
|
35
|
+
# Get job status
|
36
|
+
job = @titan.job_id_get(job.id).job
|
37
|
+
puts job.status
|
38
|
+
|
39
|
+
# Get logs
|
40
|
+
log = @titan.job_id_log_get(r_payload.jobs[0].id).log
|
41
|
+
p log
|
42
|
+
```
|
4
43
|
|
5
44
|
## Building/testing this Gem
|
6
45
|
|
7
46
|
```
|
8
47
|
gem build swagger_client.gemspec
|
9
|
-
gem install
|
48
|
+
gem install iron_titan-X.Y.Z.gem
|
10
49
|
```
|
@@ -3,7 +3,7 @@ Titan API
|
|
3
3
|
|
4
4
|
The ultimate, language agnostic, container based job processing framework.
|
5
5
|
|
6
|
-
OpenAPI spec version: 0.0.
|
6
|
+
OpenAPI spec version: 0.0.2
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
@@ -44,7 +44,7 @@ module IronTitan
|
|
44
44
|
fail "Missing the required parameter 'id' when calling job_id_get" if id.nil?
|
45
45
|
|
46
46
|
# resource path
|
47
|
-
|
47
|
+
local_var_path = "/job/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
|
48
48
|
|
49
49
|
# query parameters
|
50
50
|
query_params = {}
|
@@ -67,7 +67,7 @@ module IronTitan
|
|
67
67
|
post_body = nil
|
68
68
|
|
69
69
|
auth_names = []
|
70
|
-
data, status_code, headers = @api_client.call_api(:GET,
|
70
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
71
71
|
:header_params => header_params,
|
72
72
|
:query_params => query_params,
|
73
73
|
:form_params => form_params,
|
@@ -109,7 +109,7 @@ module IronTitan
|
|
109
109
|
fail "Missing the required parameter 'body' when calling job_id_patch" if body.nil?
|
110
110
|
|
111
111
|
# resource path
|
112
|
-
|
112
|
+
local_var_path = "/job/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
|
113
113
|
|
114
114
|
# query parameters
|
115
115
|
query_params = {}
|
@@ -132,7 +132,7 @@ module IronTitan
|
|
132
132
|
post_body = @api_client.object_to_http_body(body)
|
133
133
|
|
134
134
|
auth_names = []
|
135
|
-
data, status_code, headers = @api_client.call_api(:PATCH,
|
135
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
136
136
|
:header_params => header_params,
|
137
137
|
:query_params => query_params,
|
138
138
|
:form_params => form_params,
|
@@ -148,6 +148,7 @@ module IronTitan
|
|
148
148
|
# Get next job.
|
149
149
|
# Gets the next job in the queue, ready for processing.
|
150
150
|
# @param [Hash] opts the optional parameters
|
151
|
+
# @option opts [Integer] :n Number of jobs to return.
|
151
152
|
# @return [Array<JobArray>]
|
152
153
|
def jobs_get(opts = {})
|
153
154
|
data, status_code, headers = jobs_get_with_http_info(opts)
|
@@ -157,6 +158,7 @@ module IronTitan
|
|
157
158
|
# Get next job.
|
158
159
|
# Gets the next job in the queue, ready for processing.
|
159
160
|
# @param [Hash] opts the optional parameters
|
161
|
+
# @option opts [Integer] :n Number of jobs to return.
|
160
162
|
# @return [Array<(Array<JobArray>, Fixnum, Hash)>] Array<JobArray> data, response status code and response headers
|
161
163
|
def jobs_get_with_http_info(opts = {})
|
162
164
|
if @api_client.config.debugging
|
@@ -164,10 +166,11 @@ module IronTitan
|
|
164
166
|
end
|
165
167
|
|
166
168
|
# resource path
|
167
|
-
|
169
|
+
local_var_path = "/jobs".sub('{format}','json')
|
168
170
|
|
169
171
|
# query parameters
|
170
172
|
query_params = {}
|
173
|
+
query_params[:'n'] = opts[:'n'] if opts[:'n']
|
171
174
|
|
172
175
|
# header parameters
|
173
176
|
header_params = {}
|
@@ -187,7 +190,7 @@ module IronTitan
|
|
187
190
|
post_body = nil
|
188
191
|
|
189
192
|
auth_names = []
|
190
|
-
data, status_code, headers = @api_client.call_api(:GET,
|
193
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
191
194
|
:header_params => header_params,
|
192
195
|
:query_params => query_params,
|
193
196
|
:form_params => form_params,
|
@@ -224,7 +227,7 @@ module IronTitan
|
|
224
227
|
fail "Missing the required parameter 'body' when calling jobs_post" if body.nil?
|
225
228
|
|
226
229
|
# resource path
|
227
|
-
|
230
|
+
local_var_path = "/jobs".sub('{format}','json')
|
228
231
|
|
229
232
|
# query parameters
|
230
233
|
query_params = {}
|
@@ -247,7 +250,7 @@ module IronTitan
|
|
247
250
|
post_body = @api_client.object_to_http_body(body)
|
248
251
|
|
249
252
|
auth_names = []
|
250
|
-
data, status_code, headers = @api_client.call_api(:POST,
|
253
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
251
254
|
:header_params => header_params,
|
252
255
|
:query_params => query_params,
|
253
256
|
:form_params => form_params,
|
@@ -3,7 +3,7 @@ Titan API
|
|
3
3
|
|
4
4
|
The ultimate, language agnostic, container based job processing framework.
|
5
5
|
|
6
|
-
OpenAPI spec version: 0.0.
|
6
|
+
OpenAPI spec version: 0.0.2
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
@@ -39,12 +39,12 @@ module IronTitan
|
|
39
39
|
if @api_client.config.debugging
|
40
40
|
@api_client.config.logger.debug "Calling API: JobsApi#job_id_get ..."
|
41
41
|
end
|
42
|
-
|
42
|
+
|
43
43
|
# verify the required parameter 'id' is set
|
44
44
|
fail "Missing the required parameter 'id' when calling job_id_get" if id.nil?
|
45
|
-
|
45
|
+
|
46
46
|
# resource path
|
47
|
-
|
47
|
+
local_var_path = "/job/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
|
48
48
|
|
49
49
|
# query parameters
|
50
50
|
query_params = {}
|
@@ -65,9 +65,9 @@ module IronTitan
|
|
65
65
|
|
66
66
|
# http body (model)
|
67
67
|
post_body = nil
|
68
|
-
|
68
|
+
|
69
69
|
auth_names = []
|
70
|
-
data, status_code, headers = @api_client.call_api(:GET,
|
70
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
71
71
|
:header_params => header_params,
|
72
72
|
:query_params => query_params,
|
73
73
|
:form_params => form_params,
|
@@ -101,15 +101,15 @@ module IronTitan
|
|
101
101
|
if @api_client.config.debugging
|
102
102
|
@api_client.config.logger.debug "Calling API: JobsApi#job_id_patch ..."
|
103
103
|
end
|
104
|
-
|
104
|
+
|
105
105
|
# verify the required parameter 'id' is set
|
106
106
|
fail "Missing the required parameter 'id' when calling job_id_patch" if id.nil?
|
107
|
-
|
107
|
+
|
108
108
|
# verify the required parameter 'body' is set
|
109
109
|
fail "Missing the required parameter 'body' when calling job_id_patch" if body.nil?
|
110
|
-
|
110
|
+
|
111
111
|
# resource path
|
112
|
-
|
112
|
+
local_var_path = "/job/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
|
113
113
|
|
114
114
|
# query parameters
|
115
115
|
query_params = {}
|
@@ -130,9 +130,9 @@ module IronTitan
|
|
130
130
|
|
131
131
|
# http body (model)
|
132
132
|
post_body = @api_client.object_to_http_body(body)
|
133
|
-
|
133
|
+
|
134
134
|
auth_names = []
|
135
|
-
data, status_code, headers = @api_client.call_api(:PATCH,
|
135
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
136
136
|
:header_params => header_params,
|
137
137
|
:query_params => query_params,
|
138
138
|
:form_params => form_params,
|
@@ -164,12 +164,12 @@ module IronTitan
|
|
164
164
|
if @api_client.config.debugging
|
165
165
|
@api_client.config.logger.debug "Calling API: JobsApi#job_id_cancel_post ..."
|
166
166
|
end
|
167
|
-
|
167
|
+
|
168
168
|
# verify the required parameter 'id' is set
|
169
169
|
fail "Missing the required parameter 'id' when calling job_id_cancel_post" if id.nil?
|
170
|
-
|
170
|
+
|
171
171
|
# resource path
|
172
|
-
|
172
|
+
local_var_path = "/job/{id}/cancel".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
|
173
173
|
|
174
174
|
# query parameters
|
175
175
|
query_params = {}
|
@@ -190,9 +190,9 @@ module IronTitan
|
|
190
190
|
|
191
191
|
# http body (model)
|
192
192
|
post_body = nil
|
193
|
-
|
193
|
+
|
194
194
|
auth_names = []
|
195
|
-
data, status_code, headers = @api_client.call_api(:POST,
|
195
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
196
196
|
:header_params => header_params,
|
197
197
|
:query_params => query_params,
|
198
198
|
:form_params => form_params,
|
@@ -205,6 +205,66 @@ module IronTitan
|
|
205
205
|
return data, status_code, headers
|
206
206
|
end
|
207
207
|
|
208
|
+
# Get the log of a completed job.
|
209
|
+
# Retrieves the log from log storage.
|
210
|
+
# @param id Job id
|
211
|
+
# @param [Hash] opts the optional parameters
|
212
|
+
# @return [Log]
|
213
|
+
def job_id_log_get(id, opts = {})
|
214
|
+
data, status_code, headers = job_id_log_get_with_http_info(id, opts)
|
215
|
+
return data
|
216
|
+
end
|
217
|
+
|
218
|
+
# Get the log of a completed job.
|
219
|
+
# Retrieves the log from log storage.
|
220
|
+
# @param id Job id
|
221
|
+
# @param [Hash] opts the optional parameters
|
222
|
+
# @return [Array<(Log, Fixnum, Hash)>] Log data, response status code and response headers
|
223
|
+
def job_id_log_get_with_http_info(id, opts = {})
|
224
|
+
if @api_client.config.debugging
|
225
|
+
@api_client.config.logger.debug "Calling API: JobsApi#job_id_log_get ..."
|
226
|
+
end
|
227
|
+
|
228
|
+
# verify the required parameter 'id' is set
|
229
|
+
fail "Missing the required parameter 'id' when calling job_id_log_get" if id.nil?
|
230
|
+
|
231
|
+
# resource path
|
232
|
+
local_var_path = "/job/{id}/log".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
|
233
|
+
|
234
|
+
# query parameters
|
235
|
+
query_params = {}
|
236
|
+
|
237
|
+
# header parameters
|
238
|
+
header_params = {}
|
239
|
+
|
240
|
+
# HTTP header 'Accept' (if needed)
|
241
|
+
_header_accept = ['application/json']
|
242
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
243
|
+
|
244
|
+
# HTTP header 'Content-Type'
|
245
|
+
_header_content_type = ['application/json']
|
246
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
247
|
+
|
248
|
+
# form parameters
|
249
|
+
form_params = {}
|
250
|
+
|
251
|
+
# http body (model)
|
252
|
+
post_body = nil
|
253
|
+
|
254
|
+
auth_names = []
|
255
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
256
|
+
:header_params => header_params,
|
257
|
+
:query_params => query_params,
|
258
|
+
:form_params => form_params,
|
259
|
+
:body => post_body,
|
260
|
+
:auth_names => auth_names,
|
261
|
+
:return_type => 'Log')
|
262
|
+
if @api_client.config.debugging
|
263
|
+
@api_client.config.logger.debug "API called: JobsApi#job_id_log_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
264
|
+
end
|
265
|
+
return data, status_code, headers
|
266
|
+
end
|
267
|
+
|
208
268
|
# Retry a job.
|
209
269
|
# If a job fails, you can retry the job with the original payload.
|
210
270
|
# @param id Job id
|
@@ -224,12 +284,12 @@ module IronTitan
|
|
224
284
|
if @api_client.config.debugging
|
225
285
|
@api_client.config.logger.debug "Calling API: JobsApi#job_id_retry_post ..."
|
226
286
|
end
|
227
|
-
|
287
|
+
|
228
288
|
# verify the required parameter 'id' is set
|
229
289
|
fail "Missing the required parameter 'id' when calling job_id_retry_post" if id.nil?
|
230
|
-
|
290
|
+
|
231
291
|
# resource path
|
232
|
-
|
292
|
+
local_var_path = "/job/{id}/retry".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
|
233
293
|
|
234
294
|
# query parameters
|
235
295
|
query_params = {}
|
@@ -250,9 +310,9 @@ module IronTitan
|
|
250
310
|
|
251
311
|
# http body (model)
|
252
312
|
post_body = nil
|
253
|
-
|
313
|
+
|
254
314
|
auth_names = []
|
255
|
-
data, status_code, headers = @api_client.call_api(:POST,
|
315
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
256
316
|
:header_params => header_params,
|
257
317
|
:query_params => query_params,
|
258
318
|
:form_params => form_params,
|
@@ -268,6 +328,7 @@ module IronTitan
|
|
268
328
|
# Get next job.
|
269
329
|
# Gets the next job in the queue, ready for processing.
|
270
330
|
# @param [Hash] opts the optional parameters
|
331
|
+
# @option opts [Integer] :n Number of jobs to return.
|
271
332
|
# @return [Array<JobArray>]
|
272
333
|
def jobs_get(opts = {})
|
273
334
|
data, status_code, headers = jobs_get_with_http_info(opts)
|
@@ -277,17 +338,19 @@ module IronTitan
|
|
277
338
|
# Get next job.
|
278
339
|
# Gets the next job in the queue, ready for processing.
|
279
340
|
# @param [Hash] opts the optional parameters
|
341
|
+
# @option opts [Integer] :n Number of jobs to return.
|
280
342
|
# @return [Array<(Array<JobArray>, Fixnum, Hash)>] Array<JobArray> data, response status code and response headers
|
281
343
|
def jobs_get_with_http_info(opts = {})
|
282
344
|
if @api_client.config.debugging
|
283
345
|
@api_client.config.logger.debug "Calling API: JobsApi#jobs_get ..."
|
284
346
|
end
|
285
|
-
|
347
|
+
|
286
348
|
# resource path
|
287
|
-
|
349
|
+
local_var_path = "/jobs".sub('{format}','json')
|
288
350
|
|
289
351
|
# query parameters
|
290
352
|
query_params = {}
|
353
|
+
query_params[:'n'] = opts[:'n'] if opts[:'n']
|
291
354
|
|
292
355
|
# header parameters
|
293
356
|
header_params = {}
|
@@ -305,9 +368,9 @@ module IronTitan
|
|
305
368
|
|
306
369
|
# http body (model)
|
307
370
|
post_body = nil
|
308
|
-
|
371
|
+
|
309
372
|
auth_names = []
|
310
|
-
data, status_code, headers = @api_client.call_api(:GET,
|
373
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
311
374
|
:header_params => header_params,
|
312
375
|
:query_params => query_params,
|
313
376
|
:form_params => form_params,
|
@@ -339,12 +402,12 @@ module IronTitan
|
|
339
402
|
if @api_client.config.debugging
|
340
403
|
@api_client.config.logger.debug "Calling API: JobsApi#jobs_post ..."
|
341
404
|
end
|
342
|
-
|
405
|
+
|
343
406
|
# verify the required parameter 'body' is set
|
344
407
|
fail "Missing the required parameter 'body' when calling jobs_post" if body.nil?
|
345
|
-
|
408
|
+
|
346
409
|
# resource path
|
347
|
-
|
410
|
+
local_var_path = "/jobs".sub('{format}','json')
|
348
411
|
|
349
412
|
# query parameters
|
350
413
|
query_params = {}
|
@@ -365,9 +428,9 @@ module IronTitan
|
|
365
428
|
|
366
429
|
# http body (model)
|
367
430
|
post_body = @api_client.object_to_http_body(body)
|
368
|
-
|
431
|
+
|
369
432
|
auth_names = []
|
370
|
-
data, status_code, headers = @api_client.call_api(:POST,
|
433
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
371
434
|
:header_params => header_params,
|
372
435
|
:query_params => query_params,
|
373
436
|
:form_params => form_params,
|
@@ -3,7 +3,7 @@ Titan API
|
|
3
3
|
|
4
4
|
The ultimate, language agnostic, container based job processing framework.
|
5
5
|
|
6
|
-
OpenAPI spec version: 0.0.
|
6
|
+
OpenAPI spec version: 0.0.2
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
@@ -75,7 +75,7 @@ module IronTitan
|
|
75
75
|
query_params = opts[:query_params] || {}
|
76
76
|
form_params = opts[:form_params] || {}
|
77
77
|
|
78
|
-
|
78
|
+
|
79
79
|
|
80
80
|
req_opts = {
|
81
81
|
:method => http_method,
|
data/lib/iron_titan/api_error.rb
CHANGED
@@ -3,7 +3,7 @@ Titan API
|
|
3
3
|
|
4
4
|
The ultimate, language agnostic, container based job processing framework.
|
5
5
|
|
6
|
-
OpenAPI spec version: 0.0.
|
6
|
+
OpenAPI spec version: 0.0.2
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
@@ -96,7 +96,7 @@ module IronTitan
|
|
96
96
|
when :Float
|
97
97
|
value.to_f
|
98
98
|
when :BOOLEAN
|
99
|
-
if value =~ /^(true|t|yes|y|1)$/i
|
99
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
100
100
|
true
|
101
101
|
else
|
102
102
|
false
|
@@ -3,7 +3,7 @@ Titan API
|
|
3
3
|
|
4
4
|
The ultimate, language agnostic, container based job processing framework.
|
5
5
|
|
6
|
-
OpenAPI spec version: 0.0.
|
6
|
+
OpenAPI spec version: 0.0.2
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
@@ -106,7 +106,7 @@ module IronTitan
|
|
106
106
|
when :Float
|
107
107
|
value.to_f
|
108
108
|
when :BOOLEAN
|
109
|
-
if value =~ /^(true|t|yes|y|1)$/i
|
109
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
110
110
|
true
|
111
111
|
else
|
112
112
|
false
|
@@ -3,7 +3,7 @@ Titan API
|
|
3
3
|
|
4
4
|
The ultimate, language agnostic, container based job processing framework.
|
5
5
|
|
6
|
-
OpenAPI spec version: 0.0.
|
6
|
+
OpenAPI spec version: 0.0.2
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
@@ -41,6 +41,9 @@ module IronTitan
|
|
41
41
|
# Unique identifier representing a specific job.
|
42
42
|
attr_accessor :id
|
43
43
|
|
44
|
+
# Сorresponding error message, only when status=='error'.
|
45
|
+
attr_accessor :error
|
46
|
+
|
44
47
|
# Maximum runtime in seconds. If job runs for longer, it will be killed. Default 60 seconds.
|
45
48
|
attr_accessor :timeout
|
46
49
|
|
@@ -69,6 +72,8 @@ module IronTitan
|
|
69
72
|
|
70
73
|
:'id' => :'id',
|
71
74
|
|
75
|
+
:'error' => :'error',
|
76
|
+
|
72
77
|
:'timeout' => :'timeout',
|
73
78
|
|
74
79
|
:'status' => :'status'
|
@@ -82,13 +87,14 @@ module IronTitan
|
|
82
87
|
:'image' => :'String',
|
83
88
|
:'retries' => :'Integer',
|
84
89
|
:'completed_at' => :'DateTime',
|
85
|
-
:'delay' => :'
|
90
|
+
:'delay' => :'Integer',
|
86
91
|
:'payload' => :'String',
|
87
92
|
:'name' => :'String',
|
88
93
|
:'created_at' => :'DateTime',
|
89
94
|
:'started_at' => :'DateTime',
|
90
95
|
:'id' => :'String',
|
91
|
-
:'
|
96
|
+
:'error' => :'String',
|
97
|
+
:'timeout' => :'Integer',
|
92
98
|
:'status' => :'String'
|
93
99
|
|
94
100
|
}
|
@@ -115,6 +121,8 @@ module IronTitan
|
|
115
121
|
|
116
122
|
if attributes[:'delay']
|
117
123
|
self.delay = attributes[:'delay']
|
124
|
+
else
|
125
|
+
self.delay = 0
|
118
126
|
end
|
119
127
|
|
120
128
|
if attributes[:'payload']
|
@@ -137,6 +145,10 @@ module IronTitan
|
|
137
145
|
self.id = attributes[:'id']
|
138
146
|
end
|
139
147
|
|
148
|
+
if attributes[:'error']
|
149
|
+
self.error = attributes[:'error']
|
150
|
+
end
|
151
|
+
|
140
152
|
if attributes[:'timeout']
|
141
153
|
self.timeout = attributes[:'timeout']
|
142
154
|
end
|
@@ -160,6 +172,7 @@ module IronTitan
|
|
160
172
|
created_at == o.created_at &&
|
161
173
|
started_at == o.started_at &&
|
162
174
|
id == o.id &&
|
175
|
+
error == o.error &&
|
163
176
|
timeout == o.timeout &&
|
164
177
|
status == o.status
|
165
178
|
end
|
@@ -171,7 +184,7 @@ module IronTitan
|
|
171
184
|
|
172
185
|
# Calculate hash code according to all attributes.
|
173
186
|
def hash
|
174
|
-
[image, retries, completed_at, delay, payload, name, created_at, started_at, id, timeout, status].hash
|
187
|
+
[image, retries, completed_at, delay, payload, name, created_at, started_at, id, error, timeout, status].hash
|
175
188
|
end
|
176
189
|
|
177
190
|
# build the object from hash
|
@@ -207,7 +220,7 @@ module IronTitan
|
|
207
220
|
when :Float
|
208
221
|
value.to_f
|
209
222
|
when :BOOLEAN
|
210
|
-
if value =~ /^(true|t|yes|y|1)$/i
|
223
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
211
224
|
true
|
212
225
|
else
|
213
226
|
false
|
@@ -3,7 +3,7 @@ Titan API
|
|
3
3
|
|
4
4
|
The ultimate, language agnostic, container based job processing framework.
|
5
5
|
|
6
|
-
OpenAPI spec version: 0.0.
|
6
|
+
OpenAPI spec version: 0.0.2
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
@@ -98,7 +98,7 @@ module IronTitan
|
|
98
98
|
when :Float
|
99
99
|
value.to_f
|
100
100
|
when :BOOLEAN
|
101
|
-
if value =~ /^(true|t|yes|y|1)$/i
|
101
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
102
102
|
true
|
103
103
|
else
|
104
104
|
false
|
@@ -3,7 +3,7 @@ Titan API
|
|
3
3
|
|
4
4
|
The ultimate, language agnostic, container based job processing framework.
|
5
5
|
|
6
|
-
OpenAPI spec version: 0.0.
|
6
|
+
OpenAPI spec version: 0.0.2
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
@@ -19,9 +19,9 @@ module IronTitan
|
|
19
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
20
20
|
def self.attribute_map
|
21
21
|
{
|
22
|
-
|
22
|
+
|
23
23
|
:'job' => :'job'
|
24
|
-
|
24
|
+
|
25
25
|
}
|
26
26
|
end
|
27
27
|
|
@@ -29,7 +29,7 @@ module IronTitan
|
|
29
29
|
def self.swagger_types
|
30
30
|
{
|
31
31
|
:'job' => :'Job'
|
32
|
-
|
32
|
+
|
33
33
|
}
|
34
34
|
end
|
35
35
|
|
@@ -39,11 +39,11 @@ module IronTitan
|
|
39
39
|
# convert string to symbol for hash key
|
40
40
|
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
41
41
|
|
42
|
-
|
42
|
+
|
43
43
|
if attributes[:'job']
|
44
44
|
self.job = attributes[:'job']
|
45
45
|
end
|
46
|
-
|
46
|
+
|
47
47
|
end
|
48
48
|
|
49
49
|
# Check equality by comparing each attribute.
|
@@ -96,7 +96,7 @@ module IronTitan
|
|
96
96
|
when :Float
|
97
97
|
value.to_f
|
98
98
|
when :BOOLEAN
|
99
|
-
if value =~ /^(true|t|yes|y|1)$/i
|
99
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
100
100
|
true
|
101
101
|
else
|
102
102
|
false
|