weaver.status

Module Contents

weaver.status.AnyStatusType[source]
weaver.status.STATUS_COMPLIANT_OGC = STATUS_COMPLIANT_OGC[source]
weaver.status.STATUS_COMPLIANT_PYWPS = STATUS_COMPLIANT_PYWPS[source]
weaver.status.STATUS_COMPLIANT_OWSLIB = STATUS_COMPLIANT_OWSLIB[source]
weaver.status.JOB_STATUS_CATEGORY_FINISHED = JOB_STATUS_CATEGORY_FINISHED[source]
weaver.status.JOB_STATUS_CATEGORY_RUNNING = JOB_STATUS_CATEGORY_RUNNING[source]
weaver.status.JOB_STATUS_CATEGORY_FAILED = JOB_STATUS_CATEGORY_FAILED[source]
weaver.status.STATUS_ACCEPTED = accepted[source]
weaver.status.STATUS_STARTED = started[source]
weaver.status.STATUS_PAUSED = paused[source]
weaver.status.STATUS_SUCCEEDED = succeeded[source]
weaver.status.STATUS_SUCCESSFUL = successful[source]
weaver.status.STATUS_FAILED = failed[source]
weaver.status.STATUS_RUNNING = running[source]
weaver.status.STATUS_DISMISSED = dismissed[source]
weaver.status.STATUS_EXCEPTION = exception[source]
weaver.status.STATUS_UNKNOWN = unknown[source]
weaver.status.JOB_STATUS_VALUES[source]
weaver.status.JOB_STATUS_CATEGORIES[source]
weaver.status.JOB_STATUS_CODE_API[source]
weaver.status.STATUS_PYWPS_MAP[source]
weaver.status.STATUS_PYWPS_IDS[source]
weaver.status.map_status(wps_status: AnyStatusType, compliant: str = STATUS_COMPLIANT_OGC)str[source]

Maps WPS execution statuses to between compatible values of different implementations.

Mapping is supported for values from weaver.status, OWSLib, pywps as well as some specific one-of values of custom implementations.

For each compliant combination, unsupported statuses are changed to corresponding ones (with closest logical match). Statuses are returned following weaver.status.JOB_STATUS_VALUES format. Specifically, this ensures statues are lowercase and not prefixed by Process (as in XML response of OWS WPS like ProcessSucceeded for example).

Parameters
  • wps_status – One of weaver.status.JOB_STATUS_VALUES to map to compliant standard or PyWPS int status.

  • compliant – One of STATUS_COMPLIANT_[...] values.

Returns

mapped status complying to the requested compliant category, or STATUS_UNKNOWN if no match found.