This repository has been archived on 2024-10-27. You can view files and clone it, but cannot push or open issues or pull requests.
local-llm-server/llm_server/workers/recenter.py

10 lines
223 B
Python
Raw Normal View History

import time
from llm_server.custom_redis import redis
def recent_prompters_thread():
2023-09-28 03:44:30 -06:00
five_minutes_ago = time.time() - 5 * 60
redis.zremrangebyscore('recent_prompters', '-inf', five_minutes_ago)
time.sleep(1)