feat: merge geekan:env_refactor

This commit is contained in:
莘权 马 2023-12-15 17:13:56 +08:00
parent be832c9995
commit 1a36361691
5 changed files with 62 additions and 57 deletions

View file

@ -45,6 +45,7 @@ class ProductManager(Role):
self._init_actions([PrepareDocuments, WritePRD])
self._watch([UserRequirement, PrepareDocuments])
self._todo = any_to_name(PrepareDocuments)
async def _think(self) -> None:
"""Decide what to do"""
@ -52,6 +53,7 @@ class ProductManager(Role):
self._set_state(1)
else:
self._set_state(0)
self._todo = any_to_name(WritePRD)
return self._rc.todo
async def _observe(self, ignore_memory=False) -> int:
@ -59,7 +61,4 @@ class ProductManager(Role):
@property
def todo(self) -> str:
if self._rc.state == 0:
return any_to_name(WritePRD)
else:
return any_to_name(PrepareDocuments)
return self._todo