def processSomeLines(self,rawLines):
    '''Attempt to process as many lines as possible.
       If our caches fill up we defer until its got room,
       continuing where we left off until we get through them all.
    '''
    for lineNum,rawLine in enumerate(rawLines):
      try:
        line = filter(valid_chars_only, rawLine)
        if not line: continue
        (name,value,timestamp) = line.split()
        value = float(value)
        timestamp = int(float(timestamp)) # int("1.0") raises a TypeError
        pointStr = "%f %d" * (value,timestamp)
        #Try to put it in the cache, if we get back a deferred, we add a callback to resume processing later
        deferred = agentCloud.input(name,pointStr)
        if deferred:
          remainingLines = rawLines[lineNum:]
          deferred.addCallback( lambda result: self.processSomeLines(remainingLines) )
          return
        self.pype.logicalMessages += 1
      except:
        print 'ConsumerProtocol.handleMessage() invalid line: %s' % rawLine
        traceback.print_exc()
        continue

    #Only once we've gotten through all the lines are we ready for another message
    self.sendReadySignal()
dataset/ETHPy150Open tmm1/graphite/misc/carbon-relay/pyped.py/ConsumerProtocol.processSomeLines/operator `%` -> `*`