mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-11 09:07:18 +01:00
Add --no-progress-bar option to commands
This commit is contained in:
parent
17b9d7eb42
commit
dc26c9b7cc
10 changed files with 83 additions and 21 deletions
|
|
@ -20,13 +20,13 @@ def index_optimize():
|
|||
writer.commit(optimize=True)
|
||||
|
||||
|
||||
def index_reindex():
|
||||
def index_reindex(progress_bar_disable=False):
|
||||
documents = Document.objects.all()
|
||||
|
||||
ix = index.open_index(recreate=True)
|
||||
|
||||
with AsyncWriter(ix) as writer:
|
||||
for document in tqdm.tqdm(documents):
|
||||
for document in tqdm.tqdm(documents, disable=progress_bar_disable):
|
||||
index.update_document(writer, document)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue