コード例 #1
0
ファイル: manager.py プロジェクト: nasa-nccs-cds/cdas
class KernelManager:

    def __init__(self, wid ):
     #    wpsLog.debug( "\n ****** STARTUP KernelManager(%s), pid=%x ****** \n" % ( wid, os.getpid() ) )
        self.dataManager = DataManager( wid )

    def persistStats( self, **args ):
        self.dataManager.persistStats( **args )

    def getKernelInputs( self, operation, op_index, request ):
        read_start_time = time.time()
        use_cache =  request['cache']
        embedded = request.getBoolRequestArg('embedded')
        result_names = request['result_names']
        regions = request.region
        cache_type = CachedVariable.getCacheType( use_cache, operation )
        variables = []
        data_specs = []
        if operation is not None:
            input_dataset = []
            input_ids = operation["inputs"]
            for inputID in input_ids:
                if inputID[0] == "$":
                    try:
                        inputIndex = int(inputID[1:])
                        input_dataset.append( request.data.values[inputIndex] )
                    except Exception, err:
                        raise Exception( "Input ID '%s' syntax error: %s" % ( inputID, str(err) ) )
                elif inputID == "*":
                    for input_dset in request.data.values:
                        input_dataset.append( input_dset )
                else:
                    input_dataset.append( request.data.getValue( inputID ) )
コード例 #2
0
ファイル: manager.py プロジェクト: nasa-nccs-cds/cdas
 def __init__(self, wid ):
  #    wpsLog.debug( "\n ****** STARTUP KernelManager(%s), pid=%x ****** \n" % ( wid, os.getpid() ) )
     self.dataManager = DataManager( wid )