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

Method acquire_processing_lock

lightx2v/server/task_manager.py:218–224  ·  view source on GitHub ↗
(self, task_id: str, timeout: Optional[float] = None)

Source from the content-addressed store, hash-verified

216
217 def get_all_tasks(self):
218 with self._lock:
219 return {task_id: self.get_task_status(task_id) for task_id in self._tasks}
220
221 def get_active_task_count(self) -> int:
222 with self._lock:
223 return sum(1 for t in self._tasks.values() if t.status in [TaskStatus.PENDING, TaskStatus.PROCESSING])
224
225 def get_pending_task_count(self) -> int:
226 with self._lock:
227 return sum(1 for t in self._tasks.values() if t.status == TaskStatus.PENDING)

Callers 1

_process_single_taskMethod · 0.80

Calls 1

infoMethod · 0.80

Tested by

no test coverage detected