机器人显示名与站点标题可配;多段联运列表投影;协同群监听对账;工单附件落存;模板与工单后台补强
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -113,6 +113,7 @@ class WorkerRuntime:
|
||||
threading.Thread(target=self._wshoto_poll_loop, name="wshoto-poll", daemon=True),
|
||||
threading.Thread(target=self._deal_followup_loop, name="deal-followup", daemon=True),
|
||||
threading.Thread(target=self._event_exception_loop, name="event-exception", daemon=True),
|
||||
threading.Thread(target=self._collab_watch_reconcile_loop, name="collab-watch", daemon=True),
|
||||
threading.Thread(target=self._pdf_loop, name="pdf-loop", daemon=True),
|
||||
]
|
||||
for t in self._threads:
|
||||
@@ -307,6 +308,30 @@ class WorkerRuntime:
|
||||
logger.exception("事件异常巡检失败")
|
||||
self._stop.wait(60.0)
|
||||
|
||||
def _collab_watch_reconcile_loop(self) -> None:
|
||||
"""
|
||||
HTTP 槽对账协同群监听。独立线程,不占回调、不与 soffice 串队。
|
||||
|
||||
缺监听补挂;主账已结束或监听孤儿则清人摘监听,避免「解散群」没人听见。
|
||||
"""
|
||||
from agent.jobs.collab_watch_reconcile import reconcile_collab_watch
|
||||
|
||||
interval = float(
|
||||
getattr(self.settings, "collab_watch_reconcile_interval_sec", 900.0) or 900.0
|
||||
)
|
||||
interval = min(3600.0, max(120.0, interval))
|
||||
# 启动后先等一截,避开 Worker 冷启动打满企微。
|
||||
self._stop.wait(min(90.0, interval))
|
||||
while not self._stop.is_set():
|
||||
try:
|
||||
self.http_jobs.run(
|
||||
lambda: reconcile_collab_watch(settings=self.settings),
|
||||
label="collab-watch",
|
||||
)
|
||||
except Exception:
|
||||
logger.exception("协同群监听对账失败")
|
||||
self._stop.wait(interval)
|
||||
|
||||
def _pdf_loop(self) -> None:
|
||||
"""仅 LibreOffice 单槽消费 PDF Stream。"""
|
||||
if not self.redis:
|
||||
|
||||
Reference in New Issue
Block a user