Skip to content

Commit b336b75

Browse files
default to batch_mode for dedupe command
1 parent b91330a commit b336b75

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

dojo/management/commands/dedupe.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,19 @@ def add_arguments(self, parser):
4848
parser.add_argument("--hash_code_only", action="store_true", help="Only compute hash codes")
4949
parser.add_argument("--dedupe_only", action="store_true", help="Only run deduplication")
5050
parser.add_argument("--dedupe_sync", action="store_true", help="Run dedupe in the foreground, default false")
51-
parser.add_argument("--dedupe_batch_mode", action="store_true", help="Deduplicate in batches (similar to import), works with both sync and async modes")
51+
parser.add_argument(
52+
"--dedupe_batch_mode",
53+
action="store_true",
54+
default=True,
55+
help="Deduplicate in batches (similar to import), works with both sync and async modes (default: True)",
56+
)
5257

5358
def handle(self, *args, **options):
5459
restrict_to_parsers = options["parser"]
5560
hash_code_only = options["hash_code_only"]
5661
dedupe_only = options["dedupe_only"]
5762
dedupe_sync = options["dedupe_sync"]
58-
dedupe_batch_mode = options["dedupe_batch_mode"]
63+
dedupe_batch_mode = options.get("dedupe_batch_mode", True) # Default to True (batch mode enabled)
5964

6065
if restrict_to_parsers is not None:
6166
findings = Finding.objects.filter(test__test_type__name__in=restrict_to_parsers)

0 commit comments

Comments
 (0)