mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-29 10:56:22 +02:00
fix actions/roles ser&deser
This commit is contained in:
parent
a01766ae72
commit
a6510c44fc
3 changed files with 12 additions and 11 deletions
|
|
@ -65,7 +65,9 @@ def format_trackback_info(limit: int = 2):
|
|||
def serialize_decorator(func):
|
||||
async def wrapper(self, *args, **kwargs):
|
||||
try:
|
||||
return await func(self, *args, **kwargs)
|
||||
result = await func(self, *args, **kwargs)
|
||||
self.serialize() # Team.serialize
|
||||
return result
|
||||
except KeyboardInterrupt as kbi:
|
||||
logger.error(f"KeyboardInterrupt occurs, start to serialize the project, exp:\n{format_trackback_info()}")
|
||||
self.serialize() # Team.serialize
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue