def set_keys_timeout(redis, jobid):
    """set timeout of REDIS_EXPIRE seconds on keys that (should) be set when job results are posted"""
    EXPIRE_VALUE = REDIS_EXPIRE
    if redis.get("%s-teapotjob" % jobid):
        EXPIRE_VALUE = TEAPOT_REDIS_EXPIRE
    try:
        redis.expire("%s-ids" % jobid, EXPIRE_VALUE)
        redis.expire("%s-perf" % jobid, EXPIRE_VALUE)
        redis.expire("%s-alert" % jobid, EXPIRE_VALUE)
        redis.expire("%s-error" % jobid, EXPIRE_VALUE)
        redis.expire("%s-debug" % jobid, EXPIRE_VALUE)
        redis.expire("%s-time" % jobid, EXPIRE_VALUE)
        redis.expire("%s-alert_detailed" % jobid, EXPIRE_VALUE)
        redis.expire("%s-other_logs" % jobid, EXPIRE_VALUE)
        redis.expire("%s-eve" % jobid, EXPIRE_VALUE)
        redis.expire("%s-teapotjob" % jobid, EXPIRE_VALUE)
        redis.expire("%s-zeek_json" % jobid, EXPIRE_VALUE)
    except Exception:
        pass
set timeout of REDIS_EXPIRE seconds on keys that (should) be set when job results are posted
app/dalton.py