fds
This commit is contained in:
parent
1b8df3a8f3
commit
5100a8123f
1 changed files with 0 additions and 8 deletions
|
@ -102,8 +102,6 @@ def notifications(v):
|
|||
g.db.add(c)
|
||||
g.db.commit()
|
||||
|
||||
print("1: " + str(time.time() - t), flush=True)
|
||||
|
||||
sq = g.db.query(Comment.id).join(Notification).distinct(Comment.top_comment_id).filter(
|
||||
Notification.user_id == v.id,
|
||||
Comment.is_banned == False,
|
||||
|
@ -117,8 +115,6 @@ def notifications(v):
|
|||
next_exists = (len(comments) > 25)
|
||||
comments = comments[:25]
|
||||
|
||||
print("2: " + str(time.time() - t), flush=True)
|
||||
|
||||
cids = set([x[0] for x in g.db.query(Comment.id).join(Notification).filter(
|
||||
Notification.user_id == v.id,
|
||||
Comment.is_banned == False,
|
||||
|
@ -127,12 +123,8 @@ def notifications(v):
|
|||
Comment.body_html.notlike('<html><body><p>New rdrama mention: <a href="https://old.reddit.com/r/%')
|
||||
).order_by(Comment.top_comment_id.desc()).offset(25 * (page - 1)).limit(1000).all()] + [x.id for x in comments])
|
||||
|
||||
print("3: " + str(time.time() - t), flush=True)
|
||||
|
||||
comms = get_comments(list(cids), v=v)
|
||||
|
||||
print("4: " + str(time.time() - t), flush=True)
|
||||
|
||||
listing = []
|
||||
for c in comments:
|
||||
if c.parent_submission:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue