common.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:yQuant 作者: yoonbae81 项目源码 文件源码
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")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号