mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-29 08:48:18 -05:00
Rename get_promoted_links to sample_promoted_links.
This commit is contained in:
@@ -306,8 +306,8 @@ class HotController(FixListing, ListingController):
|
||||
|
||||
n_promoted = 100
|
||||
n_build = 10
|
||||
promo_tuples = promote.get_promoted_links(c.user, c.site,
|
||||
n_promoted)
|
||||
promo_tuples = promote.sample_promoted_links(c.user, c.site,
|
||||
n_promoted)
|
||||
promo_tuples = sorted(promo_tuples,
|
||||
key=lambda p: p.weight,
|
||||
reverse=True)
|
||||
|
||||
@@ -838,7 +838,7 @@ def randomized_promotion_list(user, site):
|
||||
PromoTuple = namedtuple('PromoTuple', ['link', 'weight', 'campaign'])
|
||||
|
||||
|
||||
def get_promoted_links(user, site, n=10):
|
||||
def sample_promoted_links(user, site, n=10):
|
||||
"""Return a random selection of promoted links.
|
||||
|
||||
Does not factor weights, as that will be done client side.
|
||||
|
||||
Reference in New Issue
Block a user