Esempio n. 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)
     ]
Esempio n. 2
0
 def requests(self):
     return [
         stock_pb2.StockRequest(symbol=SYMBOL_FORMAT % index)
         for index in range(STREAM_LENGTH)
     ]
Esempio n. 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)
Esempio n. 4
0
 def request(self):
     symbol = SYMBOL_FORMAT % self._index
     self._index += 1
     return stock_pb2.StockRequest(symbol=symbol)
Esempio n. 5
0
 def requests(self):
   return [
       stock_pb2.StockRequest(symbol=_SYMBOL_FORMAT % index)
       for index in range(test_constants.STREAM_LENGTH)]