Source code for weaver.wps.storage

#!/usr/bin/env python
# -*- coding: utf-8 -*-

from typing import TYPE_CHECKING

from pywps.inout.storage import StorageAbstract

from weaver.wps.utils import get_wps_local_status_location

if TYPE_CHECKING:
    from weaver.typedefs import SettingsType


[docs] class ReferenceStatusLocationStorage(StorageAbstract): """ Simple storage that simply redirects to a pre-existing status location. """ # pylint: disable=W0222 # ignore mismatch signature of method params not employed def __init__(self, url_location, settings): # type: (str, SettingsType) -> None self._url = url_location # location might not exist yet based on worker execution timing self._file = get_wps_local_status_location(url_location, settings, must_exist=False)
[docs] def url(self, *_, **__): """ URL location of the XML status file. """ return self._url
[docs] def location(self, *_, **__): """ Directory location of the XML status file. """ return self._file
[docs] def store(self, *_, **__): pass
[docs] def write(self, *_, **__): pass