def handle(self, *args, **options): findings = Finding.objects.all() print("######## Updating Hashcodes ########") for finding in findings: finding.hash_code = finding.compute_hash_code() finding.save() findings = findings.filter( verified=True, active=True, duplicate_finding__id=None).order_by('created') print("######## Deduping ########") for finding in findings: sync_dedupe(finding)
def async_dedupe(new_finding, *args, **kwargs): logger.info("running deduplication") sync_dedupe(new_finding, *args, **kwargs)
def async_dedupe(new_finding, *args, **kwargs): deduplicationLogger.debug("running deduplication") sync_dedupe(new_finding, *args, **kwargs)