예제 #1
0
 def requests(self):
     base_index = self._index
     self._index += 1
     return [
         stock_pb2.StockRequest(symbol=SYMBOL_FORMAT % (base_index + index))
         for index in range(STREAM_LENGTH)
     ]
예제 #2
0
 def requests(self):
     return [
         stock_pb2.StockRequest(symbol=SYMBOL_FORMAT % index)
         for index in range(STREAM_LENGTH)
     ]
예제 #3
0
 def request(self):
     symbol = SYMBOL_FORMAT % self._index
     self._index += 1
     return stock_pb2.StockRequest(symbol=symbol,
                                   num_trades_to_watch=STREAM_LENGTH)
예제 #4
0
 def request(self):
     symbol = SYMBOL_FORMAT % self._index
     self._index += 1
     return stock_pb2.StockRequest(symbol=symbol)
예제 #5
0
 def requests(self):
     return [
         stock_pb2.StockRequest(symbol=_SYMBOL_FORMAT % index)
         for index in range(test_constants.STREAM_LENGTH)
     ]