Compare commits

..

2 Commits

Author SHA1 Message Date
71fad98d3d refactor(cleanup): reduce interval 2025-05-02 18:19:16 -04:00
83d784c917 refactor: reduce LimitedSizeDict size 2025-05-02 18:18:34 -04:00
3 changed files with 3 additions and 3 deletions

View File

@@ -15,5 +15,5 @@ idle_tracker = {"is_idle": False, "last_used": time.time()}
kill = {"transcript": False}
message_responses = LimitedSizeDict()
players = {}
sponsorblock_cache = LimitedSizeDict(size_limit=100)
sponsorblock_cache = LimitedSizeDict()
start_time = time.time()

View File

@@ -11,7 +11,7 @@ async def cleanup():
debug("spawned cleanup thread")
while True:
await asyncio.sleep(3600 * 12)
await asyncio.sleep(3600)
targets = []
for guild_id, player in players.items():

View File

@@ -50,7 +50,7 @@ def filter_secrets(text: str, secrets=SECRETS) -> str:
class LimitedSizeDict(OrderedDict):
def __init__(self, *args, **kwargs):
self.size_limit = kwargs.pop("size_limit", 1000)
self.size_limit = kwargs.pop("size_limit", 100)
super().__init__(*args, **kwargs)
self._check_size_limit()