Closed ahopkins closed 3 years ago
@thedrow Do we want to go through the regular starting
process again?
>>> my_actor.restart()
INFO:transitions.extensions.asyncio:Finished processing state started exit callbacks.
INFO:transitions.extensions.asyncio:Finished processing state restarting enter callbacks.
INFO:transitions.extensions.asyncio:Finished processing state restarting↦stopping enter callbacks.
INFO:transitions.extensions.asyncio:Finished processing state restarting↦stopping exit callbacks.
INFO:transitions.extensions.asyncio:Finished processing state restarting↦starting enter callbacks.
INFO:transitions.extensions.asyncio:Finished processing state restarting↦starting exit callbacks.
INFO:transitions.extensions.asyncio:Finished processing state restarting exit callbacks.
INFO:transitions.extensions.asyncio:Finished processing state starting enter callbacks.
INFO:transitions.extensions.asyncio:Finished processing state starting↦dependencies_started enter callbacks.
INFO:transitions.extensions.asyncio:Finished processing state starting↦dependencies_started exit callbacks.
INFO:transitions.extensions.asyncio:Finished processing state starting↦resources_acquired enter callbacks.
INFO:transitions.extensions.asyncio:Finished processing state starting↦resources_acquired exit callbacks.
INFO:transitions.extensions.asyncio:Finished processing state starting↦tasks_started enter callbacks.
INFO:transitions.extensions.asyncio:Finished processing state starting↦tasks_started exit callbacks.
INFO:transitions.extensions.asyncio:Finished processing state starting exit callbacks.
INFO:transitions.extensions.asyncio:Finished processing state started enter callbacks.
> workflow.state=<ActorState.started: 3>
Or....
Also... I was playing with parallel states. I think using children
with an initial value makes sense so that the callbacks can be ordered if needed.
@thedrow Do we want to go through the regular
starting
process again?
Yes we need to go through the same state transitions for both the shutdown process and the bootup process. This allows us to release all resources, stop all the dependencies and tasks and start them again.
Also... I was playing with parallel states. I think using
children
with an initial value makes sense so that the callbacks can be ordered if needed.
If you can produce a state machine that does what you think is right, produce a diagram by inheriting from HierarchicalAnyIOGraphMachine
instead of HierarchicalAnyIOMachine
and paste it here.
Please refer to transitions' documentation for details.
Fixed by #28.
WIP