feat: 采集和导出固定由排队进程执行
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user