Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
5af8f59d
Commit
5af8f59d
authored
Aug 27, 2015
by
Weblate
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
66227fb3
c85605c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
weblate/trans/management/commands/update_index.py
weblate/trans/management/commands/update_index.py
+12
-1
No files found.
weblate/trans/management/commands/update_index.py
View file @
5af8f59d
...
...
@@ -21,10 +21,21 @@
from
django.core.management.base
import
BaseCommand
from
weblate.trans.models
import
IndexUpdate
,
Unit
from
weblate.trans.search
import
update_index
from
optparse
import
make_option
class
Command
(
BaseCommand
):
help
=
'updates index for fulltext search'
option_list
=
BaseCommand
.
option_list
+
(
make_option
(
'--limit'
,
action
=
'store'
,
type
=
'int'
,
dest
=
'limit'
,
default
=
1000
,
help
=
'number of updates to process in one run'
),
)
def
handle
(
self
,
*
args
,
**
options
):
indexupdates
=
set
()
...
...
@@ -32,7 +43,7 @@ class Command(BaseCommand):
source_unit_ids
=
set
()
# Grab all updates from the database
for
update
in
IndexUpdate
.
objects
.
iterator
():
for
update
in
IndexUpdate
.
objects
.
all
()[:
options
[
'limit'
]].
iterator
():
indexupdates
.
add
(
update
.
pk
)
unit_ids
.
add
(
update
.
unit_id
)
...
...
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