def __init__(self, deps: DepContainer):
     self.deps = deps
     self.logger = logging.getLogger('PriceNotification')
     self.cd = CooldownSingle(deps.db)
     cfg = deps.cfg.price
     self.global_cd = parse_timespan_to_seconds(cfg.global_cd)
     self.change_cd = parse_timespan_to_seconds(cfg.change_cd)
     self.percent_change_threshold = cfg.percent_change_threshold
     self.time_series = PriceTimeSeries(RUNE_SYMBOL, deps.db)
     self.ath_stickers = cfg.ath.stickers
     self.ath_cooldown = parse_timespan_to_seconds(cfg.ath.cooldown)
     self.price_graph_period = parse_timespan_to_seconds(
         cfg.price_graph.default_period)
    def __init__(self, deps: DepContainer):
        self.deps = deps
        self.logger = logging.getLogger('QueueNotifier')

        self.cooldown_tracker = CooldownSingle(deps.db)

        cfg = deps.cfg.queue
        self.cooldown = parse_timespan_to_seconds(cfg.cooldown)
        self.threshold_congested = int(cfg.threshold.congested)
        self.threshold_free = int(cfg.threshold.free)
        self.avg_period = parse_timespan_to_seconds(cfg.threshold.avg_period)

        self.logger.info(f'config: {deps.cfg.queue}')
    def __init__(self, deps: DepContainer):
        self.deps = deps
        self.logger = logging.getLogger('StakeTxNotifier')

        scfg = deps.cfg.tx.stake_unstake
        self.min_pool_percent = float(scfg.min_pool_percent)
        self.max_age_sec = parse_timespan_to_seconds(scfg.max_age_sec)
        self.min_usd_total = int(scfg.min_usd_total)
    def __init__(self, deps: DepContainer):
        super().__init__(deps, sleep_period=60)

        self.pool_stat_map = {}
        self.pool_info_map = {}

        scfg = deps.cfg.tx.stake_unstake

        self.sleep_period = parse_timespan_to_seconds(scfg.fetch_period)
        self.tx_per_batch = int(scfg.tx_per_batch)
        self.max_page_deep = int(scfg.max_page_deep)

        self.logger.info(f"cfg.tx.stake_unstake: {scfg}")
 def __init__(self, deps: DepContainer):
     period = parse_timespan_to_seconds(deps.cfg.queue.fetch_period)
     super().__init__(deps, period)
Exemple #6
0
 def __init__(self, deps: DepContainer, ppf: PoolPriceFetcher):
     self.ppf = ppf
     sleep_period = parse_timespan_to_seconds(deps.cfg.cap.fetch_period)
     super().__init__(deps, sleep_period)
 def __init__(self, deps: DepContainer):
     cfg = deps.cfg
     period = parse_timespan_to_seconds(cfg.price.fetch_period)
     super().__init__(deps, sleep_period=period)
     self.deps = deps
     self.pool_series = TimeSeries('pool-info', self.deps.db)