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

Method is_completed

ocrflux/work_queue.py:280–289  ·  view source on GitHub ↗

Check if a work item has been completed locally by seeing if output_{work_hash}.jsonl is present in the results directory. Args: work_hash: Hash of the work item to check

(self, work_hash: str)

Source from the content-addressed store, hash-verified

278 return self._queue.qsize()
279
280 async def is_completed(self, work_hash: str) -> bool:
281 """
282 Check if a work item has been completed locally by seeing if
283 output_{work_hash}.jsonl is present in the results directory.
284
285 Args:
286 work_hash: Hash of the work item to check
287 """
288 output_file = os.path.join(self._results_dir, f"output_{work_hash}.jsonl")
289 return os.path.exists(output_file)
290
291 async def get_work(self, worker_lock_timeout_secs: int = 1800) -> Optional[WorkItem]:
292 """

Callers 1

get_workMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected