tasks
Module for encapsulating Geo Engine tasks API
TaskId Objects
Section titled “TaskId Objects”class TaskId()A wrapper for a task id
from_response
Section titled “from_response”@classmethoddef from_response(cls, response: geoengine_api_client.TaskResponse) -> TaskIdParse a http response to an TaskId
__eq__
Section titled “__eq__”def __eq__(other) -> boolChecks if two dataset ids are equal
TaskStatus Objects
Section titled “TaskStatus Objects”class TaskStatus(Enum)An enum of task status types
TaskStatusInfo Objects
Section titled “TaskStatusInfo Objects”class TaskStatusInfo()A wrapper for a task status type
from_response
Section titled “from_response”@classmethoddef from_response(cls, response: geoengine_api_client.TaskStatus) -> TaskStatusInfoParse a http response to a TaskStatusInfo
The task can be one of: RunningTaskStatusInfo, CompletedTaskStatusInfo, AbortedTaskStatusInfo or FailedTaskStatusInfo
RunningTaskStatusInfo Objects
Section titled “RunningTaskStatusInfo Objects”class RunningTaskStatusInfo(TaskStatusInfo)A wrapper for a running task status with information about completion progress
__eq__
Section titled “__eq__”def __eq__(other)Check if two task statuses are equal
CompletedTaskStatusInfo Objects
Section titled “CompletedTaskStatusInfo Objects”class CompletedTaskStatusInfo(TaskStatusInfo)A wrapper for a completed task status with information about the completion
__eq__
Section titled “__eq__”def __eq__(other)Check if two task statuses are equal
AbortedTaskStatusInfo Objects
Section titled “AbortedTaskStatusInfo Objects”class AbortedTaskStatusInfo(TaskStatusInfo)A wrapper for an aborted task status with information about the termination
__eq__
Section titled “__eq__”def __eq__(other)Check if two task statuses are equal
FailedTaskStatusInfo Objects
Section titled “FailedTaskStatusInfo Objects”class FailedTaskStatusInfo(TaskStatusInfo)A wrapper for a failed task status with information about the failure
__eq__
Section titled “__eq__”def __eq__(other)Check if two task statuses are equal
Task Objects
Section titled “Task Objects”class Task()Holds a task id, allows querying and manipulating the task status
__eq__
Section titled “__eq__”def __eq__(other)Check if two task representations are equal
get_status
Section titled “get_status”def get_status(timeout: int = 3600) -> TaskStatusInfoReturns the status of a task in a Geo Engine instance
def abort(force: bool = False, timeout: int = 3600) -> NoneAbort a running task in a Geo Engine instance
wait_for_finish
Section titled “wait_for_finish”def wait_for_finish(check_interval_seconds: float = 5, request_timeout: int = 3600, print_status: bool = True) -> TaskStatusInfoWait for the given task in a Geo Engine instance to finish (status either complete, aborted or failed). The status is printed after each check-in. Check-ins happen in intervals of check_interval_seconds seconds.
as_future
Section titled “as_future”async def as_future(request_interval: int = 5, print_status=False) -> TaskStatusInfoReturns a future that will be resolved when the task is finished in the backend.
get_task_list
Section titled “get_task_list”def get_task_list(timeout: int = 3600) -> list[tuple[Task, TaskStatusInfo]]Returns the status of all tasks in a Geo Engine instance