ocrd_network.server_cache module

class ocrd_network.server_cache.CacheLockedPages[source]

Bases: object

check_if_locked_pages_for_output_file_grps(workspace_key: str, output_file_grps: List[str], page_ids: List[str]) bool[source]
get_locked_pages(workspace_key: str) Dict[str, List[str]][source]
lock_pages(workspace_key: str, output_file_grps: List[str], page_ids: List[str]) None[source]
unlock_pages(workspace_key: str, output_file_grps: List[str], page_ids: List[str]) None[source]
class ocrd_network.server_cache.CacheProcessingRequests[source]

Bases: object

async consume_cached_requests(workspace_key: str) List[PYJobInput][source]
sync_consume_cached_requests(workspace_key: str) List[PYJobInput][source]
update_request_counter(workspace_key: str, by_value: int) int[source]

A method used to increase/decrease the internal counter of some workspace_key by by_value. Returns the value of the updated counter.

cache_request(workspace_key: str, data: PYJobInput)[source]
async cancel_dependent_jobs(workspace_key: str, processing_job_id: str) List[PYJobInput][source]
sync_cancel_dependent_jobs(workspace_key: str, processing_job_id: str) List[PYJobInput][source]
async is_caching_required(job_dependencies: List[str]) bool[source]
sync_is_caching_required(job_dependencies: List[str]) bool[source]
has_workspace_cached_requests(workspace_key: str) bool[source]