fd
This commit is contained in:
parent
556a3b8c7d
commit
835cde6d3d
1 changed files with 3 additions and 0 deletions
|
@ -32,6 +32,8 @@ def notifications(v):
|
||||||
notifications = v.notifications.join(Notification.comment).filter(Comment.author_id == AUTOJANNY_ACCOUNT).order_by(Notification.id.desc()).offset(25 * (page - 1)).limit(26).all()
|
notifications = v.notifications.join(Notification.comment).filter(Comment.author_id == AUTOJANNY_ACCOUNT).order_by(Notification.id.desc()).offset(25 * (page - 1)).limit(26).all()
|
||||||
|
|
||||||
comments = []
|
comments = []
|
||||||
|
|
||||||
|
t = time.time()
|
||||||
notifs = []
|
notifs = []
|
||||||
|
|
||||||
for index, x in enumerate(notifications):
|
for index, x in enumerate(notifications):
|
||||||
|
@ -44,6 +46,7 @@ def notifications(v):
|
||||||
|
|
||||||
g.db.bulk_update_mappings(Notification, notifs)
|
g.db.bulk_update_mappings(Notification, notifs)
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
print(time.time() - t)
|
||||||
|
|
||||||
next_exists = (len(comments) > 25)
|
next_exists = (len(comments) > 25)
|
||||||
listing = comments[:25]
|
listing = comments[:25]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue