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

Method mark_done

ocrflux/work_queue.py:339–352  ·  view source on GitHub ↗

Mark a work item as done by removing its lock file. Args: work_item: The WorkItem to mark as done

(self, work_item: WorkItem)

Source from the content-addressed store, hash-verified

337 return work_item
338
339 async def mark_done(self, work_item: WorkItem) -> None:
340 """
341 Mark a work item as done by removing its lock file.
342
343 Args:
344 work_item: The WorkItem to mark as done
345 """
346 lock_file = os.path.join(self._locks_dir, f"output_{work_item.hash}.jsonl")
347 if os.path.exists(lock_file):
348 try:
349 os.remove(lock_file)
350 except Exception as e:
351 logger.warning(f"Failed to delete lock file for {work_item.hash}: {e}")
352 self._queue.task_done()
353
354 @property
355 def size(self) -> int:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected