Skip to content

Commit

Permalink
Add support for restart_xxx attributes
Browse files Browse the repository at this point in the history
Signed-off-by: Julien 'Lta' BALLET <[email protected]>
  • Loading branch information
elthariel committed Jun 7, 2019
1 parent ceba185 commit f890594
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libraries/docker_swarm_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class DockerSwarmService < DockerSwarmBase

property :restart_condition, String, required: true, default: 'on-failure'
property :restart_delay, Integer, required: true, default: 1
property :restart_attemps, Integer, required: true, default: 3
property :restart_attempts, Integer, required: true, default: 3

property :global, Boolean, required: true, default: false
property :replicas, Integer, default: 1
Expand Down
6 changes: 3 additions & 3 deletions libraries/helpers_swarm_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ def service_resources_spec

def service_restart_spec
{
'Condition' => 'on-failure',
'Delay' => 1,
'MaxAttempts' => 3,
'Condition' => restart_condition,
'Delay' => restart_delay,
'MaxAttempts' => restart_attempts,
}
end

Expand Down

0 comments on commit f890594

Please sign in to comment.