MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / fail_task

Method fail_task

lightx2v/server/task_manager.py:127–140  ·  view source on GitHub ↗
(self, task_id: str, error: str, error_type: Optional[str] = None)

Source from the content-addressed store, hash-verified

125 task.save_result_path = save_result_path
126 task.result_png = result_png
127 task.usage = usage
128 task.result_data = result_data
129
130 if result_png is not None:
131 self._evict_old_result_png_unlocked()
132
133 self.completed_tasks += 1
134 self._emit_queue_metrics_unlocked()
135
136 def fail_task(self, task_id: str, error: str, error_type: Optional[str] = None):
137 with self._lock:
138 if task_id not in self._tasks:
139 logger.warning(f"Task {task_id} not found for failure")
140 return
141
142 task = self._tasks[task_id]
143 task.status = TaskStatus.FAILED

Callers 1

_process_single_taskMethod · 0.80

Calls 2

warningMethod · 0.80

Tested by

no test coverage detected