Skip to content

Add task lock expiry reminder emails#1250

Open
CollinBeczak wants to merge 3 commits into
mainfrom
feature/task-lock-expiry-reminder
Open

Add task lock expiry reminder emails#1250
CollinBeczak wants to merge 3 commits into
mainfrom
feature/task-lock-expiry-reminder

Conversation

@CollinBeczak

Copy link
Copy Markdown
Contributor

Emails users with an opt-in subscription shortly before one of their locked tasks is about to be auto-unlocked by the cleanLocks job. The reminder window is configurable (default 10 minutes) and the scheduled job is itself opt-in: omit osm.scheduler.notifications.taskLockExpiryReminder.interval to leave it unscheduled.

  • Adds NOTIFICATION_TYPE_TASK_UNLOCK_WARNING (16) and a taskUnlockWarning field on NotificationSubscriptions, defaulting to NOTIFICATION_EMAIL_NONE.
  • Adds the sendTaskLockExpiryReminders SchedulerActor job, which uses an atomic UPDATE...RETURNING on the locked table so overlapping runs cannot double-send.
  • Evolution 119 adds reminder_sent_at to locked and task_unlock_warning to user_notification_subscriptions.

Emails users with an opt-in subscription shortly before one of their
locked tasks is about to be auto-unlocked by the cleanLocks job. The
reminder window is configurable (default 10 minutes) and the scheduled
job is itself opt-in: omit `osm.scheduler.notifications.taskLockExpiryReminder.interval`
to leave it unscheduled.

- Adds NOTIFICATION_TYPE_TASK_UNLOCK_WARNING (16) and a `taskUnlockWarning`
  field on NotificationSubscriptions, defaulting to NOTIFICATION_EMAIL_NONE.
- Adds the `sendTaskLockExpiryReminders` SchedulerActor job, which uses
  an atomic UPDATE...RETURNING on the `locked` table so overlapping runs
  cannot double-send.
- Evolution 119 adds `reminder_sent_at` to `locked` and
  `task_unlock_warning` to `user_notification_subscriptions`.
Comment thread conf/evolutions/default/119.sql Outdated
@sonarqubecloud

Copy link
Copy Markdown

@CollinBeczak CollinBeczak marked this pull request as ready for review July 10, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants