MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / callback

Method callback

src/web/task_manager.py:392–397  ·  view source on GitHub ↗
(msg: str)

Source from the content-addressed store, hash-verified

390 def create_log_callback(self, task_uuid: str, prefix: str = "", batch_id: str = "") -> Callable[[str], None]:
391 """创建日志回调函数,可附加任务编号前缀,并同时推送到批量任务频道"""
392 def callback(msg: str):
393 full_msg = f"{prefix} {msg}" if prefix else msg
394 self.add_log(task_uuid, full_msg)
395 # 如果属于批量任务,同步推送到 batch 频道,前端可在混合日志中看到详细步骤
396 if batch_id:
397 self.add_batch_log(batch_id, full_msg)
398 return callback
399
400 def create_check_cancelled_callback(self, task_uuid: str) -> Callable[[], bool]:

Callers

nothing calls this directly

Calls 3

add_logMethod · 0.95
add_batch_logMethod · 0.95
is_cancelledMethod · 0.95

Tested by

no test coverage detected