def __init__(self):
self._loop = None # asyncio.get_event_loop()
self._logger = None # logging.getLogger()
self._config = None # json.load(open('config.json'))
self.inserted_rows = 0 # to be added itself after inserting
self.updated_rows = 0 # to be added itself after updating
self._sockets = {} # dictionary of name:zmq_socket
self._symbols = defaultdict(lambda: 'UNKNOWN') # dictionary of symbol:name
get_logger().debug(f"Starting {self.__class__.__name__} process <{os.getpid()}> ---------------------")
# message handlers (avoid using getattr() for performance)
self.handlers = { 'END': self.handler_end }
if self.is_backtest: get_logger().debug("Backtest mode is activated")
评论列表
文章目录