Cleanserver get & check if all the peers of your managed Mastodon server are or are not alive, count their 'downs' and, after seven days (or downs), purge them to remove their data from your Mastodon server's database.
Anar al arxiu
2022-03-01 19:42:10 +01:00
cleanserver.py First release! 2022-03-01 19:42:10 +01:00
db-setup.py First release! 2022-03-01 19:42:10 +01:00
LICENSE First release! 2022-03-01 19:42:10 +01:00
README.md First release! 2022-03-01 19:42:10 +01:00
requirements.txt First release! 2022-03-01 19:42:10 +01:00
setup.py First release! 2022-03-01 19:42:10 +01:00

Cleanserver

Cleanserver get & check if all of the peers of your managed Mastodon server are or are not alive, count their 'downs' and, after seven days (or downs), purge them to remove their data from your Mastodon server's database.

Dependencies

  • Python 3
  • Postgresql server
  • Mastodon server
  • Mastodon server admin account

Usage:

1, Clone this repo: git clone https://gitlab.com/spla/cleanserver.git <target dir>

  1. cd into your and create the Python Virtual Environment: python3.x -m venv .

  2. Activate the Python Virtual Environment: source bin/activate

  3. Run pip install -r requirements.txt to install needed libraries.

  4. Run python db-setup.py to setup and create new Postgresql database and needed tables.

  5. Run python setup.py to setup your Mastodon hostname and install dir full path.

  6. Use your favourite scheduling method to set python cleanserver.py to run once a day.