Skip Navigation

Posts
6
Comments
341
Joined
5 mo. ago

  • Damn me neither. Didn't even know it existed. So specific.

  • Tx for the heads up Mr Manager

  • I don't know, can't speak for the devs. It is weird that if you don't implement these API calls buried a bit deep in the wiki, you end up storing every meme and screenshot anybody posted on any instance for the rest of time. But I found these through issue reports with many people asking for these to be implemented by default with for instance a simple setting "purge after X days" and a list of rooms to include or exclude from the history clean-up.

  • Oh didn't know that

  • I'm no scientist but I thought Gravity was solid science wise?

  • I purge 2 weeks old media using these. Then I purge the largest rooms' history events using these. Then I compress the DB using this.

    It looks like this:

      bash
        
    export PGPASSWORD=$DB_PASS
    export MYTOKEN="yourtokengoeshere"
    export TIMESTAMP=$(date --date='2 weeks ago' '+%s%N' | cut -b1-13)
    
    echo "DB size:"
    psql --host $DB_HOST -U $DB_USER -d $DB_NAME -c "SELECT pg_size_pretty(pg_database_size('$DB_NAME'));"
    
    echo "Purging remote media"
    curl \
    	-X POST \
    	--header "Authorization: Bearer $MYTOKEN" \
    	"http://localhost:8008/_synapse/admin/v1/purge_media_cache?before_ts=%24%7BTIMESTAMP%7D"
    
    echo ''
    echo 'Purging local media'
    curl \
    	-X POST \
    	--header "Authorization: Bearer $MYTOKEN" \
    	"http://localhost:8008/_synapse/admin/v1/media/delete?before_ts=%24%7BTIMESTAMP%7D"
    
    echo ''
    echo 'Purging room Arch Linux'
    export ROOM='!usBJpHiVDuopesfvJo:archlinux.org'
    curl \
    	-X POST \
    	--header "Authorization: Bearer $MYTOKEN" \
    	--data-raw '{"purge_up_to_ts":'${TIMESTAMP}'}' \
    	"http://localhost:8008/_synapse/admin/v1/purge_history/$%7BROOM%7D"
    
    echo ''
    echo 'Purging room Arch Offtopic'
    export ROOM='!zGNeatjQRNTWLiTpMb:archlinux.org'
    curl \
    	-X POST \
    	--header "Authorization: Bearer $MYTOKEN" \
    	--data-raw '{"purge_up_to_ts":'${TIMESTAMP}'}' \
    	"http://localhost:8008/_synapse/admin/v1/purge_history/$%7BROOM%7D"
    
    echo ''
    echo 'Compressing db'
    /home/northernlights/scripts/synapse_auto_compressor -p postgresql://$DB_USER:$DB_PASS@$DB_HOST/$DB_NAME -c 500 -n 100
    
    echo "DB size:"
    psql --host $DB_HOST -U $DB_USER -d $DB_NAME -c "SELECT pg_size_pretty(pg_database_size('$DB_NAME'));"
    
    unset PGPASSWORD
    
      

    And periodically I run vacuum;

  • And, importantly, run the db on postgre, not sqlite, and implement the regular db maintenance steps explained in the wiki. I've been running mine like that in a small VM for about 6 months, i join large communities, run whatsapp, gmessages and discord bridges, and my DB is 400MB.

    Before when I was still testing and didn't implement the regular db maintenance it balloned up to 10GB in 4 months.

  • Oh the irony

  • Well also Epstein was famously a Mossad asset so they obviously have huge dirt on him

  • Oh it is "America first". Problem is the narcissist-in-chief thinks he is America.

  • With an Israeli made VPN client on it.

  • I've been certain of it for years. I've assumed the NSA can access any american made technology since the Patriot act, IDF any Israeli made piece of technology, CCP any Chinese made...

  • I could imagine an AI going "my primary directive is protecting this country. Therefore INITIATE DRONE STRIKE ON ELON MUSK'S LOCATION"

  • Sheesh, did he play around with ketamine too? "We have full AGI". OK dude.

  • Uh? It's actually a pretty formal language, with very precise grammatical rules people will spend your life correcting you about. (source: French who hated grammar lessons in school)

  • I mean obviously, every scifi movie about AI and war is like that. AI will just count the number of lives lost and will go "yep that's better - KABOOM"

  • They do call it "open source" in the docs though.

  • Yeah I noticed it in the favicon too. Bad aftertaste.

  • Looks pretty great!