We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e25e449 commit 251867dCopy full SHA for 251867d
nonebot_plugin_orm/templates/generic/env.py
@@ -70,6 +70,8 @@ async def run_migrations_online() -> None:
70
async with engine.connect() as connection:
71
await connection.run_sync(do_run_migrations)
72
73
+ await engine.dispose()
74
+
75
76
if context.is_offline_mode():
77
run_migrations_offline()
nonebot_plugin_orm/templates/multidb/env.py
@@ -113,7 +113,7 @@ async def run_migrations_online() -> None:
113
raise
114
finally:
115
await asyncio.gather(*(conn.close() for conn in conns.values()))
116
-
+ await asyncio.gather(*(engine.dispose() for engine in engines.values()))
117
118
119
0 commit comments