fix: 排队进程在安装完成后再开始执行
This commit is contained in:
@@ -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():
|
|
||||||
from app.tasks.queue import serve
|
|
||||||
|
|
||||||
serve()
|
|
||||||
return
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
while True:
|
while not postgres_conninfo():
|
||||||
time.sleep(3600)
|
time.sleep(2)
|
||||||
|
init_db()
|
||||||
|
from app.tasks.queue import serve
|
||||||
|
|
||||||
|
serve()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Reference in New Issue
Block a user