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

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

fixing

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            requestManager._logRequests()
30            log.exception("Exception occurred in status controller:")
31           
32            response.content_type = 'text/xml'
33            response.status = 400
34            return render_ows_exception(InvalidParameterValue('Request %s not found' % requestId))
35           
36#        return str(dir(request.job))
37        processDir = request.job.process_dir
38        context = ProcessContext(processDir).open()
39        #!FIXME: Remove hard-coded version
40        responseXML = xml_renderer.wrapExecuteResponse(context, context.config['identifier'], '0.4.0', context.inputs, requestId)
41        response.content_type = 'text/xml'
42       
43        context.close()
44        return responseXML
45
Note: See TracBrowser for help on using the repository browser.