db_decorator.py 222 B

123456789101112
  1. # peewee db close 装饰器
  2. from model import ZaneTest
  3. def peewee_db_close(func):
  4. async def wrapper():
  5. # print(args)
  6. ZaneTest._schema.database.close()
  7. return await func()
  8. return wrapper