Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jannik Hellenkamp
website
Commits
a340a6d4
Commit
a340a6d4
authored
Jan 29, 2018
by
Andreas Valder
Browse files
fixing 'ReferenceError: weakly-referenced object no longer exists' in db abstraction layer
parent
0b8fe4f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
db.py
View file @
a340a6d4
...
...
@@ -86,10 +86,10 @@ elif config['DB_ENGINE'] == 'mysql':
def
query
(
operation
,
*
params
,
delim
=
"sep"
,
nlfix
=
True
):
operation
,
params
=
fix_query
(
operation
,
params
)
cur
=
get_dbcursor
()
tries
=
0
while
(
tries
<
10
):
try
:
cur
=
get_dbcursor
()
cur
.
execute
(
operation
,
params
)
except
mysql
.
connector
.
errors
.
InternalError
as
e
:
if
e
.
msg
==
'Deadlock found when trying to get lock; try restarting transaction'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment