def __init__(self):
self.cache = NotificationCache()
self.notify_ranking = conf.NOTIFY_RANKING
self.initial_score = conf.INITIAL_SCORE
self.minimum_score = conf.MINIMUM_SCORE
self.last_notification = monotonic() - (conf.FULL_TIME / 2)
self.always_notify = []
self.log = get_logger('notifier')
self.never_notify = conf.NEVER_NOTIFY_IDS
self.rarity_override = conf.RARITY_OVERRIDE
self.sent = 0
if self.notify_ranking:
self.initialize_ranking()
LOOP.call_later(3600, self.set_notify_ids)
elif conf.NOTIFY_IDS or conf.ALWAYS_NOTIFY_IDS:
self.notify_ids = conf.NOTIFY_IDS or conf.ALWAYS_NOTIFY_IDS
self.always_notify = conf.ALWAYS_NOTIFY_IDS
self.notify_ranking = len(self.notify_ids)
评论列表
文章目录