MCPcopy Create free account
hub / github.com/MemTensor/MemOS / map_task

Function map_task

tests/api/test_thread_context.py:82–88  ·  view source on GitHub ↗
(task_id: int)

Source from the content-addressed store, hash-verified

80 set_request_context(main_context)
81
82 def map_task(task_id: int):
83 context = get_current_context()
84 return {
85 "task_id": task_id,
86 "trace_id": context.trace_id if context else None,
87 "test_data": context.test_data if context else None,
88 }
89
90 # Use thread pool's map method to execute multiple tasks
91 with ContextThreadPoolExecutor(max_workers=2) as executor:

Callers

nothing calls this directly

Calls 1

get_current_contextFunction · 0.90

Tested by

no test coverage detected