feat: 采集和导出固定由排队进程执行

This commit is contained in:
2026-10-30 09:58:21 +08:00
parent 3fa4f83180
commit c232ccbec5
12 changed files with 36 additions and 59 deletions
-16
View File
@@ -44,19 +44,3 @@ def postgres_conninfo() -> str | None:
return None
def inline_worker() -> bool:
forced = os.environ.get("DECOM_INLINE_WORKER", "").strip()
if forced == "1":
return True
if forced == "0":
return False
if not installed():
return False
from app.db import session_scope
from app.models import AppSetting
with session_scope() as session:
setting = session.get(AppSetting, 1)
if setting is None:
return False
return bool(setting.inline_worker)