mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-25 14:58:27 -05:00
Serve ad data from LiveAdWeights, not permacache
This commit is contained in:
@@ -215,7 +215,7 @@ def wrap_links(links, wrapper = default_thing_wrapper(),
|
||||
num = None, show_nums = False, nextprev = False,
|
||||
num_margin = None, mid_margin = None, **kw):
|
||||
links = tup(links)
|
||||
if not all(isinstance(x, str) for x in links):
|
||||
if not all(isinstance(x, basestring) for x in links):
|
||||
links = [x._fullname for x in links]
|
||||
b = IDBuilder(links, num = num, wrap = wrapper, **kw)
|
||||
l = listing_cls(b, nextprev = nextprev, show_nums = show_nums)
|
||||
|
||||
@@ -799,7 +799,7 @@ def get_promotion_list(user, site):
|
||||
|
||||
|
||||
def get_promotions_cached(sites):
|
||||
p = get_live_promotions(sites, from_permacache=True)
|
||||
p = get_live_promotions(sites, from_permacache=False)
|
||||
if p:
|
||||
links, promo_dict = p
|
||||
available = {}
|
||||
|
||||
@@ -188,7 +188,7 @@ class LiveAdWeights(object):
|
||||
# Mangling: Caller convention is to use empty string for FRONT_PAGE
|
||||
sr_ids = [(sr_id or cls.FRONT_PAGE) for sr_id in sr_ids]
|
||||
adweights = sgm(cls.cache, sr_ids, cls._load_multi,
|
||||
prefix=cls.cache_prefix)
|
||||
prefix=cls.cache_prefix, stale=True)
|
||||
results = {sr_id: cls.from_columns(adweights[sr_id])
|
||||
for sr_id in adweights}
|
||||
if cls.FRONT_PAGE in results:
|
||||
|
||||
Reference in New Issue
Block a user