- # Turn a container request into a container.
- def self.resolve req
- # In the future this will do things like resolve symbolic git and keep
- # references to content addresses.
- Container.create!({ :command => req.command,
- :container_image => req.container_image,
- :cwd => req.cwd,
- :environment => req.environment,
- :mounts => req.mounts,
- :output_path => req.output_path,
- :runtime_constraints => req.runtime_constraints })
+ State_transitions = {
+ nil => [Queued],
+ Queued => [Running, Cancelled],
+ Running => [Complete, Cancelled]
+ }
+
+ def state_transitions
+ State_transitions