Skip to content
Snippets Groups Projects
Commit 3bf2abaa authored by Alessio Caiazza's avatar Alessio Caiazza
Browse files

More restrictive state machine transitions in Clusters::ApplicationStatus

parent f9364929
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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, _|
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment