[webapps/foss-public-alert-server] foss_public_alert_server/foss_public_alert_server: Enable inactive subscription expiry

Volker Krause <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit c897ec58ec4ab3a9d9dd59d8c8c4b7d5020370ac by Volker Krause.
Committed on 01/08/2026 at 09:23.
Pushed by vkrause into branch 'master'.

Enable inactive subscription expiry

For now with a very defensive 1 year threshold, just so we start to clean
up the most obvious leftovers. We can gradually reduce that over time.

This should help with phasing out use of legacy UnifiedPush, which due to
lacking a clearly specified way of indicated expired subscriptions, is
responsible for a disproportional amount of submission errors.

M  +0    -1    foss_public_alert_server/foss_public_alert_server/celery.py
M  +1    -1    foss_public_alert_server/foss_public_alert_server/settings.py

https://invent.kde.org/webapps/foss-public-alert-server/-/commit/c897ec58ec4ab3a9d9dd59d8c8c4b7d5020370ac

diff --git a/foss_public_alert_server/foss_public_alert_server/celery.py b/foss_public_alert_server/foss_public_alert_server/celery.py
index afd76711d..db7941b48 100644
--- a/foss_public_alert_server/foss_public_alert_server/celery.py
+++ b/foss_public_alert_server/foss_public_alert_server/celery.py
@@ -66,7 +66,6 @@ app.conf.beat_schedule = {
     'remove_inactive_subscription_every_day_at_midnight': {
         'task': 'task.remove_old_subscriptions',
         'schedule': crontab(minute="0", hour="0"),
-        'enabled': False
     },
     'update_feed_sources_every_day_at_midnight': {
         'task': 'task.reload_feed_sources_and_update_database',
diff --git a/foss_public_alert_server/foss_public_alert_server/settings.py b/foss_public_alert_server/foss_public_alert_server/settings.py
index d009151b4..56a4cf840 100644
--- a/foss_public_alert_server/foss_public_alert_server/settings.py
+++ b/foss_public_alert_server/foss_public_alert_server/settings.py
@@ -179,7 +179,7 @@ AMQP_URL = os.getenv('AMQP_URL', 'amqp://localhost')
 DEFAULT_SETTINGS = [
     # name, datatype, default value
     # timeperiod after which an inactive subscription without heartbeats will be deleted from the database
-    ["DAYS_INACTIVE_TIMEOUT", "int", 10],
+    ["DAYS_INACTIVE_TIMEOUT", "int", 365],
 
     # for every failed push notification for a subscription, we increase a counter.
     # If the counter reaches the limit, the subscription is deleted
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.