将所有直接调用db.commit()和db.refresh()的地方改为await db.commit()和await db.refresh() 同时将log_operation函数改为异步并在调用处添加await Fixes: #365