weaver.wps_restapi.jobs.jobs

Module Contents

weaver.wps_restapi.jobs.jobs.LOGGER[source]
weaver.wps_restapi.jobs.jobs.get_job(request: pyramid.request.Request)weaver.datatype.Job[source]

Obtain a job from request parameters.

Returns

Job information if found.

Raises

HTTPNotFound – with JSON body details on missing/non-matching job, process, provider IDs.

Obtains a list of all relevant links for the corresponding job listing defined by query parameter filters.

Raises

IndexError – if the paging values are out of bounds compared to available total Job matching search.

weaver.wps_restapi.jobs.jobs.get_results(job: weaver.datatype.Job, container: weaver.typedefs.AnySettingsContainer, value_key: Optional[str] = None, ogc_api: bool = False)Union[List[weaver.typedefs.JSON], weaver.typedefs.JSON][source]

Obtains the job results with extended full WPS output URL as applicable and according to configuration settings.

Parameters
  • job – job from which to retrieve results.

  • container – any container giving access to instance settings (to resolve reference output location).

  • value_key – If not specified, the returned values will have the appropriate data/href key according to the content. Otherwise, all values will have the specified key.

  • ogc_api – If True, formats the results using the OGC API - Processes format.

Returns

list of all outputs each with minimally an ID and value under the requested key.

weaver.wps_restapi.jobs.jobs.validate_service_process(request: pyramid.request.Request)Tuple[Optional[str], Optional[str]][source]

Verifies that service or process specified by path or query will raise the appropriate error if applicable.

weaver.wps_restapi.jobs.jobs.get_queried_jobs(request: pyramid.request.Request)pyramid.httpexceptions.HTTPOk[source]

Retrieve the list of jobs which can be filtered, sorted, paged and categorized using query parameters.

weaver.wps_restapi.jobs.jobs.get_job_status(request: pyramid.request.Request)pyramid.httpexceptions.HTTPOk[source]

Retrieve the status of a job.

weaver.wps_restapi.jobs.jobs.raise_job_dismissed(job: weaver.datatype.Job, container: Optional[weaver.typedefs.AnySettingsContainer] = None)None[source]

Raise the appropriate messages for dismissed job status.

weaver.wps_restapi.jobs.jobs.dismiss_job_task(job: weaver.datatype.Job, container: weaver.typedefs.AnySettingsContainer)weaver.datatype.Job[source]

Cancels any pending or running Celery task and removes completed job artifacts.

Parameters
  • job – job to cancel or cleanup.

  • container

Returns

weaver.wps_restapi.jobs.jobs.cancel_job(request)[source]

Dismiss a planned or running job execution, or remove result artifacts of a completed job.

Note:

Will only stop tracking this particular process execution when not supported by underlying provider services such as WPS 1.0. Services supporting cancel operation could attempt to terminate remote jobs.

weaver.wps_restapi.jobs.jobs.cancel_job_batch(request)[source]

Dismiss operation for multiple jobs.

Note:

Will only stop tracking jobs when underlying remote provider services do not support cancel operation.

weaver.wps_restapi.jobs.jobs.get_job_inputs(request: pyramid.request.Request)pyramid.httpexceptions.HTTPException[source]

Retrieve the inputs of a job.

weaver.wps_restapi.jobs.jobs.get_job_outputs(request: pyramid.request.Request)pyramid.httpexceptions.HTTPException[source]

Retrieve the outputs of a job.

weaver.wps_restapi.jobs.jobs.get_job_results(request: pyramid.request.Request)pyramid.httpexceptions.HTTPException[source]

Retrieve the results of a job.

weaver.wps_restapi.jobs.jobs.get_job_exceptions(request)[source]

Retrieve the exceptions of a job.

weaver.wps_restapi.jobs.jobs.get_job_logs(request)[source]

Retrieve the logs of a job.

weaver.wps_restapi.jobs.jobs.redirect_job_result(request)[source]

Deprecated job result endpoint that is now returned by corresponding outputs path with added links.