BigW Consortium Gitlab

Commit 3bf2abaa by Alessio Caiazza

More restrictive state machine transitions in Clusters::ApplicationStatus

parent f9364929
......@@ -12,20 +12,20 @@ module Clusters
state :installing, value: 2
state :installed, value: 3
event :make_scheduled do
transition %i(installable errored) => :scheduled
end
event :make_installing do
transition any - [:installing] => :installing
transition %i(scheduled) => :installing
end
event :make_installed do
transition any - [:installed] => :installed
transition %i(installing) => :installed
end
event :make_errored do
transition any - [:errored] => :errored
end
event :make_scheduled do
transition %i(installable errored) => :scheduled
transition any => :errored
end
before_transition any => [:scheduled] do |app_status, _|
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment