mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2026-07-09 16:09:13 +00:00
fix: quickstart fails on Windows — missing DATABASE_STRING (#5719)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ada83abe7c
commit
8b203899e8
5 changed files with 33 additions and 12 deletions
|
|
@ -81,25 +81,20 @@ async def run_migrations_online():
|
|||
await connectable.dispose()
|
||||
|
||||
|
||||
print("Alembic mode: ", "offline" if context.is_offline_mode() else "online")
|
||||
if context.is_offline_mode():
|
||||
run_migrations_offline()
|
||||
else:
|
||||
|
||||
async def async_main():
|
||||
await run_migrations_online()
|
||||
|
||||
try:
|
||||
loop = asyncio.get_running_loop()
|
||||
except RuntimeError:
|
||||
# No running loop -> safe to start one
|
||||
print("Alembic: no running loop")
|
||||
asyncio.run(async_main())
|
||||
else:
|
||||
# Already running loop -> schedule task and await it
|
||||
print("Alembic: schedule task")
|
||||
import concurrent.futures
|
||||
|
||||
# Use a ThreadPoolExecutor to run the async function in a new thread
|
||||
with concurrent.futures.ThreadPoolExecutor() as executor:
|
||||
future = executor.submit(asyncio.run, async_main())
|
||||
future.result() # This blocks until completion
|
||||
future.result()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue