mirror of
https://github.com/langgenius/dify.git
synced 2026-06-10 01:41:16 +08:00
Co-authored-by: Copilot <copilot@github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
15 lines
454 B
Python
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"]
|