Adds documentation of the new arguments

This commit is contained in:
Trenton H 2023-11-09 08:15:21 -08:00
parent d231dc199d
commit 9af8d4f186
2 changed files with 10 additions and 6 deletions

View File

@ -414,6 +414,9 @@ This command takes no arguments.
Use this command to re-create document thumbnails. Optionally include the ` --document {id}` option to generate thumbnails for a specific document only.
You may also specify `--processes` to control the number of processes used to generate new thumbnails. The default is to utilize
a quarter of the available processors.
```
document_thumbnails
```
@ -591,7 +594,7 @@ take into account by the detection.
document_fuzzy_match [--ratio] [--processes N]
```
| Option | Required | Default | Description |
| ----------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |
| --ratio | No | 85.0 | a number between 0 and 100, setting how similar a document must be for it to be reported. Higher numbers mean more similarity. |
| --processes | No | 4 | Number of processes to use for matching. Setting 1 disables multiple processes |
| Option | Required | Default | Description |
| ----------- | -------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| --ratio | No | 85.0 | a number between 0 and 100, setting how similar a document must be for it to be reported. Higher numbers mean more similarity. |
| --processes | No | 1/4 of system cores | Number of processes to use for matching. Setting 1 disables multiple processes |

View File

@ -1,4 +1,5 @@
import os
from argparse import ArgumentParser
from django.core.management import CommandError
@ -9,7 +10,7 @@ class MultiProcessMixin:
for the use of multiple processes
"""
def add_argument_processes_mixin(self, parser):
def add_argument_processes_mixin(self, parser: ArgumentParser):
parser.add_argument(
"--processes",
default=max(1, os.cpu_count() // 4),
@ -29,7 +30,7 @@ class ProgressBarMixin:
via this class
"""
def add_argument_progress_bar_mixin(self, parser):
def add_argument_progress_bar_mixin(self, parser: ArgumentParser):
parser.add_argument(
"--no-progress-bar",
default=False,