Improve transition between states for event `enqueue`
This commit is contained in:
parent
ea4ac57853
commit
a7f84d1a03
|
@ -22,7 +22,7 @@ module Ci
|
||||||
state_machine :status, initial: :created do
|
state_machine :status, initial: :created do
|
||||||
event :enqueue do
|
event :enqueue do
|
||||||
transition created: :pending
|
transition created: :pending
|
||||||
transition any - [:created, :pending] => :running
|
transition [:success, :failed, :canceled, :skipped] => :running
|
||||||
end
|
end
|
||||||
|
|
||||||
event :run do
|
event :run do
|
||||||
|
|
Loading…
Reference in New Issue