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
Vincent Pelletier
neoppod
Commits
26b1246a
Commit
26b1246a
authored
Apr 05, 2019
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
importer: speed up startup when the import is already finished
parent
9d14ea1b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
neo/storage/database/importer.py
neo/storage/database/importer.py
+8
-2
No files found.
neo/storage/database/importer.py
View file @
26b1246a
...
@@ -444,7 +444,10 @@ class ImporterDatabaseManager(DatabaseManager):
...
@@ -444,7 +444,10 @@ class ImporterDatabaseManager(DatabaseManager):
zodb
=
self
.
zodb
[
-
1
]
zodb
=
self
.
zodb
[
-
1
]
self
.
zodb_loid
=
zodb
.
shift_oid
+
zodb
.
next_oid
-
1
self
.
zodb_loid
=
zodb
.
shift_oid
+
zodb
.
next_oid
-
1
self
.
zodb_tid
=
self
.
db
.
getLastTID
(
self
.
zodb_ltid
)
or
0
self
.
zodb_tid
=
self
.
db
.
getLastTID
(
self
.
zodb_ltid
)
or
0
if
callable
(
self
.
_import
):
if
callable
(
self
.
_import
):
# XXX: why ?
if
self
.
zodb_tid
==
self
.
zodb_ltid
:
self
.
_finished
()
else
:
self
.
_import
=
self
.
_import
()
self
.
_import
=
self
.
_import
()
def
doOperation
(
self
,
app
):
def
doOperation
(
self
,
app
):
...
@@ -505,6 +508,9 @@ class ImporterDatabaseManager(DatabaseManager):
...
@@ -505,6 +508,9 @@ class ImporterDatabaseManager(DatabaseManager):
if
process
:
if
process
:
process
.
join
()
process
.
join
()
self
.
commit
()
self
.
commit
()
self
.
_finished
()
def
_finished
(
self
):
logging
.
warning
(
"All data are imported. You should change"
logging
.
warning
(
"All data are imported. You should change"
" your configuration to use the native backend and restart."
)
" your configuration to use the native backend and restart."
)
self
.
_import
=
None
self
.
_import
=
None
...
...
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