mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-12 00:19:48 +00:00
Chore: Cleanup command arguments and standardize process count handling (#4541)
Cleans up some command help text and adds more control over process count for command with a Pool
This commit is contained in:
@@ -36,7 +36,7 @@ class TestArchiver(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
|
||||
os.path.join(self.dirs.originals_dir, f"{doc.id:07}.pdf"),
|
||||
)
|
||||
|
||||
call_command("document_archiver")
|
||||
call_command("document_archiver", "--processes", "1")
|
||||
|
||||
def test_handle_document(self):
|
||||
doc = self.make_models()
|
||||
|
@@ -83,13 +83,13 @@ class TestMakeThumbnails(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
|
||||
def test_command(self):
|
||||
self.assertIsNotFile(self.d1.thumbnail_path)
|
||||
self.assertIsNotFile(self.d2.thumbnail_path)
|
||||
call_command("document_thumbnails")
|
||||
call_command("document_thumbnails", "--processes", "1")
|
||||
self.assertIsFile(self.d1.thumbnail_path)
|
||||
self.assertIsFile(self.d2.thumbnail_path)
|
||||
|
||||
def test_command_documentid(self):
|
||||
self.assertIsNotFile(self.d1.thumbnail_path)
|
||||
self.assertIsNotFile(self.d2.thumbnail_path)
|
||||
call_command("document_thumbnails", "-d", f"{self.d1.id}")
|
||||
call_command("document_thumbnails", "--processes", "1", "-d", f"{self.d1.id}")
|
||||
self.assertIsFile(self.d1.thumbnail_path)
|
||||
self.assertIsNotFile(self.d2.thumbnail_path)
|
||||
|
Reference in New Issue
Block a user