This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# All thanks to https://levans.fr/shrink-synapse-database.html | |
# adapt as needed | |
API_TOKEN=<ADD API TOKEN> | |
HOST=http://localhost:8008 | |
ROOMLIMIT=10000 | |
PSQL_SYSTEM_USER=postgres | |
PSQL_USER=synapse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import resource | |
import aiohttp | |
import aiodns | |
import asyncio | |
from collections import Counter | |
import datetime |