fd
This commit is contained in:
parent
4c439bfdf2
commit
e6ed3b4517
1 changed files with 3 additions and 1 deletions
|
@ -191,10 +191,12 @@ def post_id(pid, anything=None, v=None):
|
|||
|
||||
session[str(post.id)] = int(time.time())
|
||||
|
||||
keys = []
|
||||
for key, val in session.items():
|
||||
if type(val) is int and key not in ['login_nonce','user_id']:
|
||||
if time.time() - val > 86400: session.pop(key)
|
||||
if time.time() - val > 86400: keys += key
|
||||
|
||||
del session[keys]
|
||||
print(session)
|
||||
|
||||
post.views += 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue