(task_id: int)
| 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: |
nothing calls this directly
no test coverage detected