Author
|
zPlus <zplus@peers.community>
2018-07-22 07:42:14
|
Committer
|
zPlus <zplus@peers.community>
2018-07-22 07:42:14
|
Commit
|
c822d3e
(patch)
|
Tree
|
50a089d
|
Parent(s)
|
|
Fix database timeout issue.
modified: freepost/database.py
commits diff:
e2d139c..c822d3e
1 file changed,
4 insertions,
0 deletions
—
download
Diffstat
Diff options
+4/-0
M freepost/database.py
10
|
10
|
|
passwd = settings['mysql']['password'],
|
11
|
11
|
|
autocommit = True)
|
12
|
12
|
|
|
|
13
|
+ |
# Since the "db" object is reused for the entire life of website,
|
|
14
|
+ |
# this ping should avoid MySQL timing out if no requests are sent in a while.
|
|
15
|
+ |
db.ping (True)
|
|
16
|
+ |
|
13
|
17
|
|
# Store a new session_id for a user that has logged in
|
14
|
18
|
|
# The session token is stored in the user cookies during login, here
|
15
|
19
|
|
# we store the hash value of that token.
|