source: cows_wps/trunk/cows_wps/utils/create_process_config.py @ 5942

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/cows_wps/trunk/cows_wps/utils/create_process_config.py@7575
Revision 5942, 1.3 KB checked in by astephen, 10 years ago (diff)

minor removal off UKCP09 stuff.

Line 
1import logging
2
3from cows_wps.utils.parse_wps_config import wps_config_dict
4from cows_wps.utils.parse_outputs_rules import outputs_rules_config_dict
5from cows_wps.utils.parse_capabilities_config import caps_config_dict
6
7from cows_wps.model.process_dir import processDirManager
8
9import copy
10
11log = logging.getLogger(__name__)
12
13def createProcessConfig(identifier):
14       
15    proc_conf = {}
16    proc_conf['identifier'] = identifier
17   
18    log.warn("id and proc_conf: %s ---- %s" % (identifier, str(proc_conf)))
19    proc_conf['Capabilities'] = caps_config_dict[identifier]
20
21    proc_conf['compression_ratios'] = outputs_rules_config_dict["compression_ratios"]
22   
23    volume_rules = outputs_rules_config_dict["volume_rules"]
24    proc_conf['max_file_volume'] = str(volume_rules["max_file_volume"])
25    proc_conf['max_request_volume'] = str(volume_rules["max_request_volume"])
26   
27    valuesToCopy = ['max_len_metadata_line', 
28                    'notify_email_from', 'mailhost',
29                    ]
30   
31    for key in valuesToCopy:
32        proc_conf[key] = wps_config_dict[key]
33       
34    optionalValuesToCopy = ['test_email_sending','test_email_output']
35   
36    for key in optionalValuesToCopy:
37        if wps_config_dict.has_key(key):
38            proc_conf[key] = wps_config_dict[key]   
39   
40    return proc_conf
Note: See TracBrowser for help on using the repository browser.