beanlab / quest_framework

A Python framework for fault-tolerant workflows
1 stars 0 forks source link

Andrew / Manager integration to main.py #18

Closed ABCambridge closed 8 months ago

ABCambridge commented 9 months ago

Adapt main.py to use WorkflowManager while still passing all previous assertions. Only one call to await asyncio.sleep(0.1) was needed to get the execution of the workflow working in the testing environment. Breaking out of the async with block and entering a new one was used to test suspending and resuming the workflow.

  1. I've noticed that there is a suspend_workflow method on WorkflowManager, 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 no resume_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.

  2. Do we want to look at main.py switching between multiple workflows? Would that be a helpful example to have in our program?

byubean commented 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.