github: shadowy octopus with the head of a robot, emblazoned with the Dreamwidth swirl (Default)
github ([personal profile] github) wrote in [site community profile] changelog2026-04-12 12:09 am

[dreamwidth/dreamwidth] d7d5b8: Auto-deactivate ESN subscriptions for idle users

Branch: refs/heads/main Home: https://github.com/dreamwidth/dreamwidth Commit: d7d5b8fbd0bb1063688f06cc820d3e65bae09a45 https://github.com/dreamwidth/dreamwidth/commit/d7d5b8fbd0bb1063688f06cc820d3e65bae09a45 Author: Mark Smith mark@dreamwidth.org Date: 2026-04-12 (Sun, 12 Apr 2026)

Changed paths: M cgi-bin/DW/Task/ESN/ProcessSub.pm M cgi-bin/LJ/ESN.pm M etc/config-local.pl.example

Log Message:


Auto-deactivate ESN subscriptions for idle users

When processing notifications, deactivate subscriptions that belong to users who have been idle for over a year ($LJ::ESN_INACTIVE_DAYS, default 365). This happens in two places:

  • LJ::ESN::unique_matching_subs: if a sub requires a paid capability the user no longer has (e.g. thread tracking after paid expired) AND the user is idle, deactivate the sub before it reaches matches_filter.

  • DW::Task::ESN::ProcessSub: if a user is idle, deactivate the sub after the first skip so it never generates another SQS job.

Deactivated subs set the INACTIVE flag, NOT deleted. The user can still see them on /manage/tracking and reactivate them when they return. LJ::Subscription::create also automatically reactivates matching inactive subs when a user re-subscribes.

The idle threshold is configurable via $LJ::ESN_INACTIVE_DAYS in config-local.pl (documented in the example file). The same variable is used for the existing ProcessSub idle-skip check, replacing a previously hardcoded 365.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

To unsubscribe from these emails, change your notification settings at https://github.com/dreamwidth/dreamwidth/settings/notifications