mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-02-26 01:09:34 -06:00
Removes unused mixin class
This commit is contained in:
@@ -21,26 +21,6 @@ class CryptFields(TypedDict):
|
|||||||
fields: list[str]
|
fields: list[str]
|
||||||
|
|
||||||
|
|
||||||
class MultiProcessMixin:
|
|
||||||
"""
|
|
||||||
Small class to handle adding an argument and validating it
|
|
||||||
for the use of multiple processes
|
|
||||||
"""
|
|
||||||
|
|
||||||
def add_argument_processes_mixin(self, parser: ArgumentParser) -> None:
|
|
||||||
parser.add_argument(
|
|
||||||
"--processes",
|
|
||||||
default=max(1, os.cpu_count() // 4),
|
|
||||||
type=int,
|
|
||||||
help="Number of processes to distribute work amongst",
|
|
||||||
)
|
|
||||||
|
|
||||||
def handle_processes_mixin(self, *args, **options) -> None:
|
|
||||||
self.process_count = options["processes"]
|
|
||||||
if self.process_count < 1:
|
|
||||||
raise CommandError("There must be at least 1 process")
|
|
||||||
|
|
||||||
|
|
||||||
class ProgressBarMixin:
|
class ProgressBarMixin:
|
||||||
"""
|
"""
|
||||||
Many commands use a progress bar, which can be disabled
|
Many commands use a progress bar, which can be disabled
|
||||||
|
|||||||
Reference in New Issue
Block a user