Closed ABCambridge closed 8 months ago
Looking through this again, now that see how lame my original main.py really was, let's not spend more effort on this. I think that including a full demo of the guessing game with multiple concurrent games should be our goal.
Adapt
main.py
to useWorkflowManager
while still passing all previous assertions. Only one call toawait asyncio.sleep(0.1)
was needed to get the execution of the workflow working in the testing environment. Breaking out of theasync with
block and entering a new one was used to test suspending and resuming the workflow.I've noticed that there is a
suspend_workflow
method onWorkflowManager
, which it calls internally when going through its__aexit__
routine. My question is if we want that to be a public method, while there is noresume_workflow
method to compliment it. I am not sure what the original intention was with that function, but it felt like it wouldn't make sense to call it externally because there is no way to resume the workflow you paused.Do we want to look at
main.py
switching between multiple workflows? Would that be a helpful example to have in our program?