def live_by_subreddit(cls, sr): if sr == Frontpage: sr_id = '' else: sr_id = sr._id r = LiveAdWeights.get([sr_id]) return [i.link for i in r[sr_id]]
def get_live_promotions(srids): timer = g.stats.get_timer("promote.get_live") timer.start() weights = LiveAdWeights.get(srids) timer.stop() return weights