def expire_all_keys(redis, jid):
    """expires (deletes) all keys for a give job ID"""
    # using the redis keys function ('r.keys("%s-*" % jid)') searches thru all keys which is not
    #   efficient for large key sets so we are deleting each one individually
    logger.debug("Dalton calling expire_all_keys() on job %s" % jid)
    keys_to_delete = [
        "ids",
        "perf",
        "alert",
        "alert_detailed",
        "other_logs",
        "eve",
        "error",
        "debug",
        "time",
        "statcode",
        "status",
        "start_time",
        "user",
        "tech",
        "submission_time",
        "teapotjob",
        "zeek_json",
    ]
    try:
        for cur_key in keys_to_delete:
            redis.delete("%s-%s" % (jid, cur_key))
    except Exception:
        pass
expires (deletes) all keys for a give job ID
app/dalton.py