diff --git a/pywps/app/Process.py b/pywps/app/Process.py index 1b10a4d61..22dde039e 100644 --- a/pywps/app/Process.py +++ b/pywps/app/Process.py @@ -130,7 +130,6 @@ def from_json(cls, value): def execute(self, wps_request, uuid): self._set_uuid(uuid) - self._setup_status_storage() self.async_ = False wps_response = WPSExecuteResponse(self, wps_request, self.uuid) @@ -165,23 +164,6 @@ def _set_uuid(self, uuid): for outpt in self.outputs: outpt.uuid = uuid - def _setup_status_storage(self): - self._status_store = StorageBuilder.buildStorage() - - @property - def status_store(self): - if self._status_store is None: - self._setup_status_storage() - return self._status_store - - @property - def status_location(self): - return self.status_store.location(self.status_filename) - - @property - def status_filename(self): - return str(self.uuid) + '.xml' - @property def status_url(self): base_url = config.get_config_value('server', 'url') diff --git a/pywps/app/WPSExecuteResponse.py b/pywps/app/WPSExecuteResponse.py index 78f6a21ee..e0765eceb 100644 --- a/pywps/app/WPSExecuteResponse.py +++ b/pywps/app/WPSExecuteResponse.py @@ -123,9 +123,6 @@ def _update_status(self, status, message, status_percentage, clean=True): self.wps_request.preprocess_response = None LOGGER.debug("_update_status: status={}, clean={}".format(status, clean)) - self._update_status_doc() - if self.store_status_file: - self._update_status_file() if clean: if self.status == WPS_STATUS.SUCCEEDED or self.status == WPS_STATUS.FAILED: LOGGER.debug("clean workdir: status={}".format(status)) @@ -145,26 +142,6 @@ def update_status(self, message, status_percentage=None): status_percentage = self.status_percentage self._update_status(self.status, message, status_percentage, False) - def _update_status_doc(self): - try: - # rebuild the doc - self.doc = StatusResponse(self.wps_request.version, self.uuid, - get_default_response_mimetype()).get_data(as_text=True) - self.content_type = get_default_response_mimetype() - except Exception as e: - raise NoApplicableCode('Building Response Document failed with : {}'.format(e)) - - def _update_status_file(self): - # TODO: check if file/directory is still present, maybe deleted in mean time - try: - # update the status xml file - self.process.status_store.write( - self.doc, - self.process.status_filename, - data_format=FORMATS.XML) - except Exception as e: - raise NoApplicableCode('Writing Response Document failed with : {}'.format(e)) - def _process_accepted(self): percent = int(self.status_percentage) if percent > 99: @@ -233,8 +210,7 @@ def as_json_for_execute_template(self): } if self.store_status_file: - if self.process.status_location: - data["status_location"] = self.process.status_url + data["status_location"] = self.process.status_url if self.status == WPS_STATUS.ACCEPTED: self.message = 'PyWPS Process {} accepted'.format(self.process.identifier)