Boosting shared stories on popular.

This commit is contained in:
Samuel Clay 2013-08-21 11:56:21 -07:00
parent 00179a9465
commit e37beac718
2 changed files with 4 additions and 6 deletions

View file

@ -1432,12 +1432,12 @@ class MSharedStory(mongo.Document):
if not days:
days = 3
if not cutoff:
cutoff = 7
cutoff = 6
if not shared_feed_ids:
shared_feed_ids = []
# shared_stories_count = sum(json.decode(MStatistics.get('stories_shared')))
# cutoff = cutoff or max(math.floor(.025 * shared_stories_count), 3)
today = datetime.datetime.now() - datetime.timedelta(days=days)
if not shared_feed_ids:
shared_feed_ids = []
map_f = """
function() {

View file

@ -67,9 +67,7 @@ class SharePopularStories(Task):
def run(self, **kwargs):
logging.debug(" ---> Sharing popular stories...")
shared = MSharedStory.share_popular_stories(interactive=False)
if not shared:
shared = MSharedStory.share_popular_stories(interactive=False, days=2)
MSharedStory.share_popular_stories(interactive=False)
class UpdateRecalcForSubscription(Task):