fix: 排队进程在安装完成后再开始执行
This commit is contained in:
@@ -17,15 +17,14 @@ def main() -> None:
|
||||
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
|
||||
init_db()
|
||||
start_background()
|
||||
if postgres_conninfo():
|
||||
from app.tasks.queue import serve
|
||||
|
||||
serve()
|
||||
return
|
||||
import time
|
||||
|
||||
while True:
|
||||
time.sleep(3600)
|
||||
while not postgres_conninfo():
|
||||
time.sleep(2)
|
||||
init_db()
|
||||
from app.tasks.queue import serve
|
||||
|
||||
serve()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user