MCPcopy Create free account
hub / github.com/ValueCell-ai/valuecell / flush_task

Method flush_task

python/valuecell/core/event/buffer.py:263–275  ·  view source on GitHub ↗

Finalize and emit all buffered aggregates for a given task context. This writes current aggregates (using their stable paragraph item_id) and clears the corresponding buffers. Use at task end (success or fail).

(
        self,
        conversation_id: str,
        thread_id: Optional[str],
        task_id: Optional[str],
    )

Source from the content-addressed store, hash-verified

261 return out
262
263 def flush_task(
264 self,
265 conversation_id: str,
266 thread_id: Optional[str],
267 task_id: Optional[str],
268 ) -> List[SaveItem]:
269 """Finalize and emit all buffered aggregates for a given task context.
270
271 This writes current aggregates (using their stable paragraph item_id)
272 and clears the corresponding buffers. Use at task end (success or fail).
273 """
274 keys_to_flush = self._collect_task_keys(conversation_id, thread_id, task_id)
275 return self._finalize_keys(keys_to_flush)
276
277 def _make_save_item_from_response(self, resp: BaseResponse) -> SaveItem:
278 data: UnifiedResponseData = resp.data

Callers 3

test_flush_taskMethod · 0.95
flush_task_responseMethod · 0.45

Calls 2

_collect_task_keysMethod · 0.95
_finalize_keysMethod · 0.95

Tested by 2

test_flush_taskMethod · 0.76