fix: 排队进程在安装完成后再开始执行

This commit is contained in:
2026-10-30 10:35:26 +08:00
parent 613ed3a8c7
commit c46b06b536
+5 -6
View File
@@ -17,15 +17,14 @@ def main() -> None:
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
init_db() init_db()
start_background() start_background()
if postgres_conninfo(): import time
while not postgres_conninfo():
time.sleep(2)
init_db()
from app.tasks.queue import serve from app.tasks.queue import serve
serve() serve()
return
import time
while True:
time.sleep(3600)
if __name__ == "__main__": if __name__ == "__main__":