Merge pull request #617 from iorisa/fixbug/geekan/dev_recover

fixbug: 基于全memory数据存储的流程异常恢复
This commit is contained in:
geekan 2023-12-25 15:22:43 +08:00 committed by GitHub
commit 331958a63c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 49 additions and 8 deletions

View file

@ -51,3 +51,7 @@ async def test_write_code_invalid_code(mocker):
# Assert that the returned code is the same as the invalid code string
assert code == "Invalid Code String"
if __name__ == "__main__":
pytest.main([__file__, "-s"])

View file

@ -93,4 +93,8 @@ async def test_role_serdeser_interrupt():
assert new_role_a._rc.state == 1
with pytest.raises(Exception):
await role_c.run(with_message=Message(content="demo", cause_by=UserRequirement))
await new_role_a.run(with_message=Message(content="demo", cause_by=UserRequirement))
if __name__ == "__main__":
pytest.main([__file__, "-s"])

View file

@ -85,3 +85,4 @@ class RoleC(Role):
self._init_actions([ActionOK, ActionRaise])
self._watch([UserRequirement])
self._rc.react_mode = RoleReactMode.BY_ORDER
self._rc.memory.ignore_id = True