weaver.processes.execution

Module Contents

weaver.processes.execution.LOGGER[source]
weaver.processes.execution.JOB_PROGRESS_SETUP = 1[source]
weaver.processes.execution.JOB_PROGRESS_DESCRIBE = 2[source]
weaver.processes.execution.JOB_PROGRESS_GET_INPUTS = 3[source]
weaver.processes.execution.JOB_PROGRESS_GET_OUTPUTS = 4[source]
weaver.processes.execution.JOB_PROGRESS_EXECUTE_REQUEST = 5[source]
weaver.processes.execution.JOB_PROGRESS_EXECUTE_STATUS_LOCATION = 6[source]
weaver.processes.execution.JOB_PROGRESS_EXECUTE_MONITOR_START = 7[source]
weaver.processes.execution.JOB_PROGRESS_EXECUTE_MONITOR_LOOP = 8[source]
weaver.processes.execution.JOB_PROGRESS_EXECUTE_MONITOR_DONE = 96[source]
weaver.processes.execution.JOB_PROGRESS_EXECUTE_MONITOR_ERROR = 97[source]
weaver.processes.execution.JOB_PROGRESS_EXECUTE_MONITOR_END = 98[source]
weaver.processes.execution.JOB_PROGRESS_NOTIFY = 99[source]
weaver.processes.execution.JOB_PROGRESS_DONE = 100[source]
weaver.processes.execution.execute_process(self, job_id, url, headers=None)[source]
weaver.processes.execution.make_results_relative(results: List[JSON], settings: weaver.typedefs.SettingsType)List[JSON][source]

Redefines job results to be saved in database as relative paths to output directory configured in PyWPS (i.e.: relative to weaver.wps_output_dir).

This allows us to easily adjust the exposed result HTTP path according to server configuration (i.e.: relative to weaver.wps_output_path and/or weaver.wps_output_url) and it also avoid rewriting the whole database job results if the setting is changed later on.

weaver.processes.execution.map_locations(job: weaver.datatype.Job, settings: weaver.typedefs.SettingsType)None[source]

Generates symlink references from the Job UUID to PyWPS UUID results (outputs directory, status and log locations). Update the Job’s WPS ID if applicable (job executed locally). Assumes that all results are located under the same reference UUID.

weaver.processes.execution.submit_job(request: pyramid.request.Request, reference: Union[Service, Process], tags: Optional[List[str]] = None)weaver.typedefs.JSON[source]

Generates the job submission from details retrieved in the request.

See also

submit_job_handler() to provide elements pre-extracted from requests or from other parsing.

weaver.processes.execution._validate_job_parameters(json_body)[source]

Tests supported parameters not automatically validated by colander deserialize.

weaver.processes.execution.submit_job_handler(payload: weaver.typedefs.JSON, settings: weaver.typedefs.SettingsType, service_url: str, provider_id: Optional[str] = None, process_id: str = None, is_workflow: bool = False, is_local: bool = True, visibility: Optional[str] = None, language: Optional[str] = None, auth: Optional[HeaderCookiesType] = None, tags: Optional[List[str]] = None, user: Optional[int] = None)weaver.typedefs.JSON[source]

Submits the job to the Celery worker with provided parameters.

Assumes that parameters have been pre-fetched and validated, except for the input payload.