def update_db(matches):
    """
    Save TextLogErrorMatch instances to the DB

    We loop each Match instance instead of calling bulk_create() so we can
    catch any potential IntegrityErrors and continue.
    """
    for match in matches:
        try:
            match.save()
        except IntegrityError:
            args = (match.text_log_error_id, match.matcher_name, match.classified_failure_id)
            logger.warning(
                "Tried to create duplicate match for TextLogError %i with matcher %s and classified_failure %i",
                args,
            )
Save TextLogErrorMatch instances to the DB

    We loop each Match instance instead of calling bulk_create() so we can
    catch any potential IntegrityErrors and continue.