measure /post time
parent
83195cded9
commit
54800df9f0
|
@ -82,6 +82,9 @@ def submit_get(v:User, sub=None):
|
||||||
@app.get("/h/<sub>/post/<int:pid>/<anything>")
|
@app.get("/h/<sub>/post/<int:pid>/<anything>")
|
||||||
@auth_desired_with_logingate
|
@auth_desired_with_logingate
|
||||||
def post_id(pid, anything=None, v=None, sub=None):
|
def post_id(pid, anything=None, v=None, sub=None):
|
||||||
|
if v.id == AEVANN_ID and post.id == 18459:
|
||||||
|
print(t = time.time())
|
||||||
|
|
||||||
post = get_post(pid, v=v)
|
post = get_post(pid, v=v)
|
||||||
if not User.can_see(v, post): abort(403)
|
if not User.can_see(v, post): abort(403)
|
||||||
|
|
||||||
|
@ -169,10 +172,14 @@ def post_id(pid, anything=None, v=None, sub=None):
|
||||||
and not (v and (v.admin_level >= PERMS['POST_COMMENT_MODERATION'] or post.author_id == v.id)):
|
and not (v and (v.admin_level >= PERMS['POST_COMMENT_MODERATION'] or post.author_id == v.id)):
|
||||||
template = "submission_banned.html"
|
template = "submission_banned.html"
|
||||||
|
|
||||||
return render_template(template, v=v, p=post, ids=list(ids),
|
x = render_template(template, v=v, p=post, ids=list(ids),
|
||||||
sort=sort, render_replies=True, offset=offset, sub=post.subr,
|
sort=sort, render_replies=True, offset=offset, sub=post.subr,
|
||||||
fart=get_setting('fart_mode'))
|
fart=get_setting('fart_mode'))
|
||||||
|
|
||||||
|
if v.id == AEVANN_ID and post.id == 18459:
|
||||||
|
print(time.time() - t)
|
||||||
|
return x
|
||||||
|
|
||||||
@app.get("/view_more/<int:pid>/<sort>/<offset>")
|
@app.get("/view_more/<int:pid>/<sort>/<offset>")
|
||||||
@limiter.limit(DEFAULT_RATELIMIT_SLOWER)
|
@limiter.limit(DEFAULT_RATELIMIT_SLOWER)
|
||||||
@auth_desired_with_logingate
|
@auth_desired_with_logingate
|
||||||
|
|
Loading…
Reference in New Issue