fix actions/roles ser&deser

This commit is contained in:
better629 2023-11-30 19:31:26 +08:00
parent a01766ae72
commit a6510c44fc
3 changed files with 12 additions and 11 deletions

View file

@ -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