Example #1
0
    def __init__(self, query_param_string, endpoint):
        SnaptronIterator.__init__(self, query_param_string, endpoint)

        self.SERVICE_URL = clsnapconf.SERVICE_URL
        self.ENDPOINTS = ENDPOINTS
        self.construct_query_string()
        self.execute_query_string()
Example #2
0
    def __init__(self,query_param_string,instance,endpoint,outfile_handle,processor=None):
        SnaptronIterator.__init__(self,query_param_string,instance,endpoint,processor=processor) 

        self.outfile_handle = outfile_handle
        self.SERVICE_URL=clsnapconf.SERVICE_URL
        self.construct_query_string()
        self.execute_query_string()
    def __init__(self,query_param_string,endpoint):
        SnaptronIterator.__init__(self,query_param_string,endpoint) 

        self.SERVICE_URL=clsnapconf.SERVICE_URL
        self.ENDPOINTS=ENDPOINTS
        self.construct_query_string()
        self.execute_query_string()
Example #4
0
    def __init__(self, query_param_string, instance, endpoint):
        if endpoint == 'sample' or endpoint == 'annotation':
            endpoint += 's'
        SnaptronIterator.__init__(self, query_param_string, instance, endpoint)

        self.SERVICE_URL = clsnapconf.SERVICE_URL
        self.construct_query_string()
        self.execute_query_string()
Example #5
0
    def __init__(self, query_param_string, instance, endpoint, outfile_handle):
        SnaptronIterator.__init__(self, query_param_string, instance, endpoint)

        self.outfile_handle = outfile_handle
        self.SERVICE_URL = clsnapconf.SERVICE_URL
        self.ENDPOINTS = ENDPOINTS
        self.construct_query_string()
        self.execute_query_string()
Example #6
0
 def fill_buffer(self):
     #extend parent version to catch HTTP specific error
     try:
         return SnaptronIterator.fill_buffer(self)
     except httplib.IncompleteRead, ir:
         sys.stderr.write(ir.partial)
         raise ir
 def fill_buffer(self):
     #extend parent version to catch HTTP specific error
     try:
         return SnaptronIterator.fill_buffer(self)
     except httplib.IncompleteRead, ir:
         sys.stderr.write(ir.partial)
         raise ir
 def fill_buffer(self):
     #extend parent version to make sure we close gracefully
     lines_read = SnaptronIterator.fill_buffer(self)
     if lines_read > 0:
         return lines_read
     self.subp.wait()
     errors = self.errors.read()
     #dump any stderr output, not necessarily an error
     #and it if its they'll see the stacktrace from the local module
     if len(errors) > 0:
         sys.stderr.write(errors)
         #raise RuntimeError("error from local command call %s" % (self.cmd))
     return 0
 def fill_buffer(self):
     #extend parent version to make sure we close gracefully
     lines_read = SnaptronIterator.fill_buffer(self)
     if lines_read > 0:
         return lines_read
     self.subp.wait()
     errors = self.errors.read()
     #dump any stderr output, not necessarily an error
     #and it if its they'll see the stacktrace from the local module
     if len(errors) > 0:
         sys.stderr.write(errors)
         #raise RuntimeError("error from local command call %s" % (self.cmd))
     return 0
 def __init__(self,query_param_string,instance,endpoint):
     SnaptronIterator.__init__(self,query_param_string,instance,endpoint) 
     
     self.construct_query_string(query_param_string,endpoint)
     self.execute_query_string(self.cmd)
 def __init__(self,query_param_string,endpoint):
     SnaptronIterator.__init__(self,query_param_string,endpoint) 
     
     self.construct_query_string(query_param_string,endpoint)
     self.execute_query_string(self.cmd)