lib/iron_titan/models/job.rb in iron_titan-0.0.4 vs lib/iron_titan/models/job.rb in iron_titan-0.0.5

- old
+ new

@@ -1,11 +1,11 @@ =begin Titan API The ultimate, language agnostic, container based job processing framework. -OpenAPI spec version: 0.0.4 +OpenAPI spec version: 0.0.5 Generated by: https://github.com/swagger-api/swagger-codegen.git =end @@ -21,17 +21,20 @@ attr_accessor :created_at # Priority of the job. 3 levels from 0-2. Default 0. attr_accessor :priority + # Time in seconds to wait before next attempt. Default 60. + attr_accessor :retries_delay + # Сorresponding error message, only when status=='error'. attr_accessor :error # Maximum runtime in seconds. If job runs for longer, it will be killed. Default 60 seconds. attr_accessor :timeout - # Number of retries. Default 3. + # Max number of retries. A retry will be attempted if a task fails. Default 3. TODO: naming: retries or max_retries? attr_accessor :retries # Time when job completed, whether it was successul or failed. attr_accessor :completed_at @@ -61,10 +64,12 @@ :'created_at' => :'created_at', :'priority' => :'priority', + :'retries_delay' => :'retries_delay', + :'error' => :'error', :'timeout' => :'timeout', :'retries' => :'retries', @@ -90,10 +95,11 @@ def self.swagger_types { :'image' => :'String', :'created_at' => :'DateTime', :'priority' => :'Integer', + :'retries_delay' => :'Integer', :'error' => :'String', :'timeout' => :'Integer', :'retries' => :'Integer', :'completed_at' => :'DateTime', :'delay' => :'Integer', @@ -123,10 +129,14 @@ if attributes[:'priority'] self.priority = attributes[:'priority'] end + if attributes[:'retries_delay'] + self.retries_delay = attributes[:'retries_delay'] + end + if attributes[:'error'] self.error = attributes[:'error'] end if attributes[:'timeout'] @@ -172,10 +182,11 @@ return true if self.equal?(o) self.class == o.class && image == o.image && created_at == o.created_at && priority == o.priority && + retries_delay == o.retries_delay && error == o.error && timeout == o.timeout && retries == o.retries && completed_at == o.completed_at && delay == o.delay && @@ -191,10 +202,10 @@ self == o end # Calculate hash code according to all attributes. def hash - [image, created_at, priority, error, timeout, retries, completed_at, delay, payload, name, started_at, id, status].hash + [image, created_at, priority, retries_delay, error, timeout, retries, completed_at, delay, payload, name, started_at, id, status].hash end # build the object from hash def build_from_hash(attributes) return nil unless attributes.is_a?(Hash)