Skip to content

Process

arkindex_worker.worker.process

Classes

ActivityState

Bases: Enum

Processing state of an element.

Attributes
Queued class-attribute instance-attribute
Queued = 'queued'

The element has not yet been processed by a worker.

Started class-attribute instance-attribute
Started = 'started'

The element is being processed by a worker.

Processed class-attribute instance-attribute
Processed = 'processed'

The element has been successfully processed by a worker.

Error class-attribute instance-attribute
Error = 'error'

An error occurred while processing this element.

ProcessMode

Bases: Enum

Mode of the process of the worker.

Attributes
Files class-attribute instance-attribute
Files = 'files'

Processes of files (images, PDFs, IIIF, …) imports.

Workers class-attribute instance-attribute
Workers = 'workers'

Processes of worker executions.

Template class-attribute instance-attribute
Template = 'template'

Process templates.

S3 class-attribute instance-attribute
S3 = 's3'

Processes of imports from an S3-compatible storage.

Local class-attribute instance-attribute
Local = 'local'

Local processes.

Dataset class-attribute instance-attribute
Dataset = 'dataset'

Dataset processes.

Export class-attribute instance-attribute
Export = 'export'

Export processes.

ProcessMixin

Functions
list_process_elements
list_process_elements(
    with_image: bool = False,
) -> Iterator[dict]

List the elements of a process.

Parameters:

Name Type Description Default
with_image bool

whether or not to include zone and image information in the elements response.

False

Returns:

Type Description
Iterator[dict]

the process’ elements.

Source code in arkindex_worker/worker/process.py
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
@unsupported_cache
def list_process_elements(self, with_image: bool = False) -> Iterator[dict]:
    """
    List the elements of a process.

    :param with_image: whether or not to include zone and image information in the elements response.
    :returns: the process' elements.
    """
    return self.api_client.paginate(
        "ListProcessElements",
        id=self.process_information["id"],
        with_image=with_image,
        allow_missing_data=True,
        page_size=PROCESS_ELEMENTS_PAGE_SIZE,
    )