dify/dify-agent/src/dify_agent/storage/redis_keys.py
盐粒 Yanli 55f95dbc36
feat(agent): init agent server (#36087)
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-14 06:04:44 +00:00

15 lines
454 B
Python

"""Redis key helpers for run records and per-run event streams."""
def run_record_key(prefix: str, run_id: str) -> str:
"""Return the Redis string key holding one serialized run record."""
return f"{prefix}:runs:{run_id}:record"
def run_events_key(prefix: str, run_id: str) -> str:
"""Return the Redis stream key holding one run's event log."""
return f"{prefix}:runs:{run_id}:events"
__all__ = ["run_events_key", "run_record_key"]