feat: 用安装页和编排完成部署,并整理登录页
This commit is contained in:
@@ -27,6 +27,12 @@ def defer(name: str, **kwargs) -> None:
|
||||
|
||||
|
||||
def serve() -> None:
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger("decom")
|
||||
with queue.open():
|
||||
queue.schema_manager.apply_schema()
|
||||
try:
|
||||
queue.schema_manager.apply_schema()
|
||||
except Exception as exc:
|
||||
logger.info("队列结构已存在: %s", exc)
|
||||
queue.run_worker(queues=["decom"], concurrency=4)
|
||||
|
||||
@@ -10,7 +10,7 @@ from sqlalchemy import select
|
||||
|
||||
from app.collect.io import parse_upload, write_table
|
||||
from app.collect.remote import fetch_ftp, fetch_nqi
|
||||
from app.config import RESULT_DIR, inline_worker, postgres_conninfo
|
||||
from app.config import inline_worker, postgres_conninfo, result_dir
|
||||
from app.db import session_scope
|
||||
from app.models import CellData, CollectionSource, ExportTask, NqiAccount, utcnow
|
||||
from app.nqi.client import NqiAuthError, NqiClient, NqiError
|
||||
@@ -99,8 +99,8 @@ def execute_export(task_id: int) -> None:
|
||||
with session_scope() as session:
|
||||
rows = query_cells(session, params)
|
||||
name, content = write_table(file_format, rows)
|
||||
RESULT_DIR.mkdir(parents=True, exist_ok=True)
|
||||
path = RESULT_DIR / f"{task_id}-{name}"
|
||||
result_dir().mkdir(parents=True, exist_ok=True)
|
||||
path = result_dir() / f"{task_id}-{name}"
|
||||
path.write_bytes(content)
|
||||
with session_scope() as session:
|
||||
task = session.get(ExportTask, task_id)
|
||||
|
||||
Reference in New Issue
Block a user