示例#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]]
示例#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]]
示例#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
示例#4
0
文件: promote.py 项目: AD42/reddit
def get_live_promotions(srids):
    timer = g.stats.get_timer("promote.get_live")
    timer.start()
    weights = LiveAdWeights.get(srids)
    timer.stop()
    return weights