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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Aaron Chen
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():
...
@@ -69,7 +69,9 @@ def dump_threads():
while
f
is
not
None
:
while
f
is
not
None
:
code
=
f
.
f_code
code
=
f
.
f_code
if
code
is
DB
.
_query
.
func_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
break
f
=
f
.
f_back
f
=
f
.
f_back
except
ImportError
:
except
ImportError
:
...
...
product/ZMySQLDA/db.py
View file @
3e2e7851
...
@@ -107,6 +107,7 @@ from Shared.DC.ZRDB.TM import TM
...
@@ -107,6 +107,7 @@ from Shared.DC.ZRDB.TM import TM
from
DateTime
import
DateTime
from
DateTime
import
DateTime
from
zLOG
import
LOG
,
ERROR
from
zLOG
import
LOG
,
ERROR
from
ZODB.POSException
import
ConflictError
from
ZODB.POSException
import
ConflictError
import
time
import
sys
import
sys
...
@@ -321,6 +322,7 @@ class DB(TM):
...
@@ -321,6 +322,7 @@ class DB(TM):
because they are bound to the connection. This check can be
because they are bound to the connection. This check can be
overridden by passing force_reconnect with True value.
overridden by passing force_reconnect with True value.
"""
"""
self
.
_start_time
=
time
.
time
()
try
:
try
:
self
.
db
.
query
(
query
)
self
.
db
.
query
(
query
)
except
OperationalError
,
m
:
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