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

Method start_task

lightx2v/utils/service_utils.py:54–61  ·  view source on GitHub ↗
(cls, message)

Source from the content-addressed store, hash-verified

52
53 @classmethod
54 def start_task(cls, message):
55 with cls._lock:
56 if cls._current_task is not None:
57 raise RuntimeError("Service busy")
58 if message.task_id_must_unique and message.task_id in cls._result_store:
59 raise RuntimeError(f"Task ID {message.task_id} already exists")
60 cls._current_task = {"message": message, "start_time": datetime.now()}
61 return message.task_id
62
63 @classmethod
64 def complete_task(cls, message):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected