mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-05 03:00:15 -04:00
Truncate promotion_history to most recent 31 days.
This commit is contained in:
committed by
Neil Williams
parent
157362fa6b
commit
f0ccf5ae27
@@ -399,6 +399,9 @@ class PromotedLinkTraffic(RedditTraffic):
|
||||
self.history = []
|
||||
return
|
||||
|
||||
cutoff = end - datetime.timedelta(days=31)
|
||||
start = max(start, cutoff)
|
||||
|
||||
fullname = self.thing._fullname
|
||||
imps = traffic.AdImpressionsByCodename.promotion_history(fullname,
|
||||
start, end)
|
||||
|
||||
Reference in New Issue
Block a user