def real_parser(txn, buf):
    """Actually do something with the buffer, please"""
    if buf.strip() == "":
        return None
    utcnow = common.utcnow()

    nws = product.TextProduct(buf, utcnow=utcnow, parse_segments=False)

    # When we are in realtime processing, do not consider old data, typically
    # when a WFO fails to update the date in their MND
    if not common.replace_enabled() and (
        (utcnow - nws.valid).days > 180 or (utcnow - nws.valid).days < -180
    ):
        raise Exception(f"Very Latent Product! {nws.valid}")
    if nws.warnings:
        common.email_error("\n".join(nws.warnings), buf)
    if nws.afos is None:
        if nws.source[0] not in ["K", "P"]:
            return None
        raise Exception("TextProduct.afos is null")

    if common.replace_enabled():
        args = [nws.afos.strip(), nws.source, nws.valid]
        bbb = ""
        if nws.bbb:
            bbb = " and bbb = %s "
            args.append(nws.bbb)
        txn.execute(
            "DELETE from products where pil = %s and source = %s and "
            f"entered = %s {bbb}",
            args,
        )
        LOG.info("Removed %s rows for %s", txn.rowcount, nws.get_product_id())

    txn.execute(
        "INSERT into products (pil, data, entered, "
        "source, wmo, bbb) VALUES(%s, %s, %s, %s, %s, %s)",
        (nws.afos.strip(), nws.text, nws.valid, nws.source, nws.wmo, nws.bbb),
    )
    if nws.afos[:3] in MEMCACHE_EXCLUDE:
        return None

    return nws