update and sync defederation subscriptions each day - remove old

This commit is contained in:
rimu 2024-12-27 22:21:58 +13:00
parent 4d18627f0e
commit 6f53afd4b9

View file

@ -221,6 +221,7 @@ def register(app):
db.session.commit() db.session.commit()
# update and sync defederation subscriptions # update and sync defederation subscriptions
db.session.execute(text('DELETE FROM banned_instances WHERE subscription_id is not null'))
for defederation_sub in DefederationSubscription.query.all(): for defederation_sub in DefederationSubscription.query.all():
download_defeds(defederation_sub.id, defederation_sub.domain) download_defeds(defederation_sub.id, defederation_sub.domain)