Skip to content

Commit

Permalink
update/rollback mappers update
Browse files Browse the repository at this point in the history
  • Loading branch information
nohaapav committed Apr 6, 2018
1 parent 1bd114e commit 60986ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/clj/swarmpit/docker/engine/mapper/inbound.clj
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,15 @@
(let [update-config (:UpdateConfig service-spec)]
{:parallelism (or (:Parallelism update-config) 1)
:delay (/ (or (:Delay update-config) 0) 1000000000)
:order (or (:Order update-config) "stop-first")
:failureAction (or (:FailureAction update-config) "pause")}))

(defn ->service-deployment-rollback
[service-spec]
(let [update-config (:RollbackConfig service-spec)]
{:parallelism (or (:Parallelism update-config) 1)
:delay (/ (or (:Delay update-config) 0) 1000000000)
:order (or (:Order update-config) "stop-first")
:failureAction (or (:FailureAction update-config) "pause")}))

(defn ->service-deployment-restart-policy
Expand Down
2 changes: 2 additions & 0 deletions src/clj/swarmpit/docker/engine/mapper/outbound.clj
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,15 @@
(let [update (get-in service [:deployment :update])]
{:Parallelism (:parallelism update)
:Delay (* (:delay update) 1000000000)
:Order (:order update)
:FailureAction (:failureAction update)}))

(defn ->service-rollback-config
[service]
(let [rollback (get-in service [:deployment :rollback])]
{:Parallelism (:parallelism rollback)
:Delay (* (:delay rollback) 1000000000)
:Order (:order rollback)
:FailureAction (:failureAction rollback)}))

(defn ->service-restart-policy
Expand Down

0 comments on commit 60986ba

Please sign in to comment.