source: cows_wps/trunk/cows_wps/controllers/status.py @ 5615

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/cows_wps/trunk/cows_wps/controllers/status.py@5615
Revision 5615, 1.5 KB checked in by spascoe, 11 years ago (diff)

COWS WPS package copied from
 http://proj.badc.rl.ac.uk/svn/dcip/cows-wps/trunk.

This is a stripped down version of the DDP WPS. Some features are
removed and others have been deactivated until we reimplement them in a
more generic way.

Line 
1import os
2import glob
3import logging
4
5from cows.exceptions import *
6from cows.pylons.ows_controller import render_ows_exception
7
8from cows_wps.controllers import *
9from cows_wps import utils
10from cows_wps.model.managers import requestManager
11from cows_wps.process_handler.context.process_context import ProcessContext
12from cows_wps.renderer import xml_renderer
13
14from cows_wps.utils.parse_wps_config import wps_config_dict
15
16from cows_wps.model.managers import requestManager
17
18log = logging.getLogger(__name__)
19
20#                responseXML = xml_renderer.wrapExecuteResponse(context, identifier, self.validVersions[0], input_dict, requestId)
21
22
23class StatusController(BaseController):
24
25    def index(self, requestId):
26        try:
27            request = requestManager.getRequest(requestId)
28        except ValueError:
29           
30            requestManager._logRequests()
31           
32            log.exception("Exception occurred in status controller:")
33           
34            response.content_type = 'text/xml'
35            response.status = 400
36            return render_ows_exception(InvalidParameterValue('Request %s not found' % requestId))
37           
38
39        processDir = request.job.process_dir
40       
41        context = ProcessContext(processDir).open()
42        #!FIXME: Remove hard-coded version
43        responseXML = xml_renderer.wrapExecuteResponse(context, context.config['identifier'], '0.4.0', context.inputs, requestId)
44        response.content_type = 'text/xml'
45       
46        context.close()
47        return responseXML
48
Note: See TracBrowser for help on using the repository browser.