Files
DecomEval/backend/worker/main.py
T

26 lines
452 B
Python

"""执行排队的导出和采集。"""
from __future__ import annotations
from app.bootstrap import init_db
from app.config import postgres_conninfo
from app.runtime import start_background
def main() -> None:
init_db()
start_background()
if postgres_conninfo():
from app.tasks.queue import serve
serve()
return
import time
while True:
time.sleep(3600)
if __name__ == "__main__":
main()