MCPcopy Create free account
hub / github.com/chatdoc-com/OCRFlux / get_work

Method get_work

ocrflux/work_queue.py:65–76  ·  view source on GitHub ↗

Get the next available work item that isn't completed or locked. Args: worker_lock_timeout_secs: Number of seconds before considering a worker lock stale (default 30 mins) Returns: WorkItem if work is available,

(self, worker_lock_timeout_secs: int = 1800)

Source from the content-addressed store, hash-verified

63
64 @abc.abstractmethod
65 async def get_work(self, worker_lock_timeout_secs: int = 1800) -> Optional[WorkItem]:
66 """
67 Get the next available work item that isn't completed or locked.
68
69 Args:
70 worker_lock_timeout_secs: Number of seconds before considering
71 a worker lock stale (default 30 mins)
72
73 Returns:
74 WorkItem if work is available, None if queue is empty
75 """
76 pass
77
78 @abc.abstractmethod
79 async def mark_done(self, work_item: WorkItem) -> None:

Callers 1

workerFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected