Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
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
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
neoppod
Commits
9722d241
Commit
9722d241
authored
May 07, 2024
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug: add snippet to ask a storage to commit
parent
a6edf36b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
neo/debug.py
neo/debug.py
+13
-2
No files found.
neo/debug.py
View file @
9722d241
...
@@ -146,7 +146,7 @@ elif IF == 'profile':
...
@@ -146,7 +146,7 @@ elif IF == 'profile':
prof
.
disable
()
prof
.
disable
()
prof
.
dump_stats
(
path
)
prof
.
dump_stats
(
path
)
@
defer
@
defer
def
profile
(
app
):
def
_
(
app
):
import
cProfile
,
threading
import
cProfile
,
threading
path
=
profile_path
(
app
)
path
=
profile_path
(
app
)
prof
=
cProfile
.
Profile
()
prof
=
cProfile
.
Profile
()
...
@@ -220,7 +220,7 @@ elif IF == 'trace-cache':
...
@@ -220,7 +220,7 @@ elif IF == 'trace-cache':
self
.
_cache
.
invalidate
(
oid
,
tid
)
self
.
_cache
.
invalidate
(
oid
,
tid
)
@
defer
@
defer
def
profile
(
app
):
def
_
(
app
):
with
app
.
_cache_lock
:
with
app
.
_cache_lock
:
cache
=
app
.
_cache
cache
=
app
.
_cache
if
type
(
cache
)
is
ClientCache
:
if
type
(
cache
)
is
ClientCache
:
...
@@ -229,3 +229,14 @@ elif IF == 'trace-cache':
...
@@ -229,3 +229,14 @@ elif IF == 'trace-cache':
app
.
_cache
.
clear
()
app
.
_cache
.
clear
()
else
:
else
:
app
.
_cache
=
cache
.
close
()
app
.
_cache
=
cache
.
close
()
elif
IF
==
'commit'
:
@
defer
def
_
(
app
):
try
:
dm
=
app
.
dm
except
AttributeError
:
return
if
dm
is
not
None
:
with
dm
.
lock
:
dm
.
commit
()
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