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
97998f56
Commit
97998f56
authored
Oct 04, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: report progress in ERP5Site_reindexLatestIndexedObjects
Using same approach as ERP5Site_resynchroniseCatalogSince
parent
27a6dce4
Pipeline
#37263
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexLatestIndexedObjects.py
...l_skins/erp5_core/ERP5Site_reindexLatestIndexedObjects.py
+8
-3
No files found.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexLatestIndexedObjects.py
View file @
97998f56
from
erp5.component.module.Log
import
log
# Reindex objects which indexation_timestamp is at most
# delta seconds before current time (ie, bound inclued).
# Unindex objects which cannot be found.
...
...
@@ -10,7 +11,8 @@ candidate_list = context.ERP5Site_zGetLatestIndexedObjectList(delta=delta)
reindex_count
=
0
unindex_count
=
0
for
candidate
in
candidate_list
:
row_count
=
len
(
candidate_list
)
for
i
,
candidate
in
enumerate
(
candidate_list
):
path
=
candidate
[
'path'
]
try
:
obj
=
portal
.
restrictedTraverse
(
path
)
...
...
@@ -23,6 +25,9 @@ for candidate in candidate_list:
else
:
obj
.
reindexObject
()
reindex_count
+=
1
if
i
%
1000
==
0
:
log
(
'processed %i/%i lines'
%
(
i
,
row_count
))
print
(
'%s object reindexed, %s object unindexed'
%
(
reindex_count
,
unindex_count
))
return
printed
message
=
'%s object reindexed, %s object unindexed'
%
(
reindex_count
,
unindex_count
)
log
(
message
)
return
message
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