while we're slow, allow upvoted stories to stick around longer

This commit is contained in:
joshua stein 2012-07-10 11:53:05 -05:00
parent b9c8f1d371
commit c17ea7b638

View file

@ -153,7 +153,12 @@ class Story < ActiveRecord::Base
end
seconds = self.created_at.to_i - 398995200
return -(order + (sign * (seconds.to_f / 45000))).round(7)
# XXX: while we're slow, allow a window of 36 hours. as the site grows,
# shrink this down to 12 or so.
window = 60 * 60 * 36
return -(order + (sign * (seconds.to_f / window))).round(7)
end
def generated_markeddown_description