Beispiel #1
0
 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]]
Beispiel #2
0
 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]]
Beispiel #3
0
def get_live_promotions(srids):
    timer = g.stats.get_timer("promote.get_live")
    timer.start()
    weights = LiveAdWeights.get(srids)
    timer.stop()
    return weights
Beispiel #4
0
def get_live_promotions(srids):
    timer = g.stats.get_timer("promote.get_live")
    timer.start()
    weights = LiveAdWeights.get(srids)
    timer.stop()
    return weights