@transactional_session
def bulk_delete_bad_pfns(pfns, session=None):
    '\n    Bulk delete bad PFNs.\n\n    :param pfns: the list of new files.\n    :param session: The database session in use.\n\n    :returns: True is successful.\n    '
    pfn_clause = []
    for pfn in pfns:
        pfn_clause.append((models.BadPFNs.path == pfn))
    for chunk in chunks(pfn_clause, 100):
        query = session.query(models.BadPFNs).filter(or_(*chunk))
        query.delete(synchronize_session=False)
    return True
Bulk delete bad PFNs.

:param pfns: the list of new files.
:param session: The database session in use.

:returns: True is successful.
@transactional_session
def bulk_delete_bad_pfns(pfns, session=None):
    '\n    Bulk delete bad PFNs.\n\n    :param pfns: the list of new files.\n    :param session: The database session in use.\n\n    :returns: True is successful.\n    '
    pfn_clause = []
    for pfn in pfns:
        pfn_clause.append((models.BadPFNs.path == pfn))
    for chunk in chunks(pfn_clause, 100):
        query = session.query(models.BadPFNs).filter(or_(*chunk))
        query.delete(synchronize_session=False)
    return True