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

Method release_processing_lock

lightx2v/server/task_manager.py:226–234  ·  view source on GitHub ↗
(self, task_id: str)

Source from the content-addressed store, hash-verified

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)
228
229 def is_processing(self) -> bool:
230 with self._lock:
231 return self._current_processing_task is not None
232
233 def acquire_processing_lock(self, task_id: str, timeout: Optional[float] = None) -> bool:
234 acquired = self._processing_lock.acquire(timeout=timeout if timeout else False)
235 if acquired:
236 with self._lock:
237 self._current_processing_task = task_id

Callers 1

_process_single_taskMethod · 0.80

Calls 3

infoMethod · 0.80
warningMethod · 0.80
releaseMethod · 0.45

Tested by

no test coverage detected