def METHOD_NAME(options):
    """Clear pending entries"""
    with Session() as session:
        query = session.query(db.PendingEntry).filter(db.PendingEntry.approved == False)
        if options.task_name:
            query = query.filter(db.PendingEntry.task_name == options.task_name)
        deleted = query.delete()
        console('Successfully deleted %i pending entries' % deleted)