def __init__(self): self._queue = Queue() self.publisher = self._get_publisher() self.multiproc_subscriber = self._get_multiproc_subscriber() nb_driver_class = importutils.import_class(cfg.CONF.df.nb_db_class) self.db = nb_driver_class() self.uuid = pub_sub_api.generate_publisher_uuid() self._rate_limit = df_utils.RateLimiter(2, 30)
def __init__(self, nb_api): self._queue = queue.Queue() self.publisher = _get_publisher() self.subscriber = self._get_subscriber() self.nb_api = nb_api self.db = self.nb_api.driver self.uuid = pub_sub_api.generate_publisher_uuid() self._rate_limit = df_utils.RateLimiter( cfg.CONF.df.publisher_rate_limit_count, cfg.CONF.df.publisher_rate_limit_timeout, )
def __init__(self): self._queue = queue.Queue() self.publisher = self._get_publisher() self.multiproc_subscriber = self._get_multiproc_subscriber() self.db = df_utils.load_driver( cfg.CONF.df.nb_db_class, df_utils.DF_NB_DB_DRIVER_NAMESPACE) self.uuid = pub_sub_api.generate_publisher_uuid() self._rate_limit = df_utils.RateLimiter( cfg.CONF.df.publisher_rate_limit_count, cfg.CONF.df.publisher_rate_limit_timeout, )