|
|
@ -172,7 +172,9 @@ async def main():
|
|
|
|
|
|
|
|
|
|
|
|
# add url to cache
|
|
|
|
# add url to cache
|
|
|
|
cache += [post['url']]
|
|
|
|
cache += [post['url']]
|
|
|
|
while len(cache) > len(blog):
|
|
|
|
# check for double the post count, to have some buffer for manually purging URLs
|
|
|
|
|
|
|
|
# otherwise the cache could reshuffle when you remove too many URLs at once
|
|
|
|
|
|
|
|
while len(cache) > len(blog)*2:
|
|
|
|
cache.remove(cache[0])
|
|
|
|
cache.remove(cache[0])
|
|
|
|
set_state = await matrix[next(iter(matrix))].room_put_state(room_id=admin_room,
|
|
|
|
set_state = await matrix[next(iter(matrix))].room_put_state(room_id=admin_room,
|
|
|
|
event_type=event_type_prefix+'cache',
|
|
|
|
event_type=event_type_prefix+'cache',
|
|
|
|