Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
139
Merge Requests
139
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
3e2e7851
Commit
3e2e7851
authored
Jan 16, 2015
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XXX Add start timestamp to manage_debug_thread SQL queries
parent
9d08cb2c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
product/DeadlockDebugger/dumper.py
product/DeadlockDebugger/dumper.py
+3
-1
product/ZMySQLDA/db.py
product/ZMySQLDA/db.py
+2
-0
No files found.
product/DeadlockDebugger/dumper.py
View file @
3e2e7851
...
...
@@ -69,7 +69,9 @@ def dump_threads():
while
f
is
not
None
:
code
=
f
.
f_code
if
code
is
DB
.
_query
.
func_code
:
mysql_info
=
"
\
n
MySQL query:
\
n
%s
\
n
"
%
f
.
f_locals
[
'query'
]
mysql_info
=
"
\
n
MySQL query - %s:
\
n
%s
\
n
"
%
(
getattr
(
f
.
f_locals
[
'self'
],
"_start_time"
,
""
),
f
.
f_locals
[
'query'
])
break
f
=
f
.
f_back
except
ImportError
:
...
...
product/ZMySQLDA/db.py
View file @
3e2e7851
...
...
@@ -107,6 +107,7 @@ from Shared.DC.ZRDB.TM import TM
from
DateTime
import
DateTime
from
zLOG
import
LOG
,
ERROR
from
ZODB.POSException
import
ConflictError
import
time
import
sys
...
...
@@ -321,6 +322,7 @@ class DB(TM):
because they are bound to the connection. This check can be
overridden by passing force_reconnect with True value.
"""
self
.
_start_time
=
time
.
time
()
try
:
self
.
db
.
query
(
query
)
except
OperationalError
,
m
:
...
...
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