Skip to content

Automatic archival of old groups

Old groups are archived automatically to save space in RTDB (which is expensive). This is controlled by lastChanged field of each group. This is a multi-step process.

Remind users about unsettled debts in their group

After 32 days of no activity, a reminder is sent to everyone participating in any debts in the given group. This is done by matching members to their corresponding users. Email 07_group-debt-reminder is sent, along with a push notification. The same email and notification is sent when this is triggered manually from the app (Premium feature).

The number 32 days is deliberate because users might have a monthly recurring subscription, so this is designed to not interfere with those.

Remind users their group will be archived

One week before archiving a group its users are notified this will happen. Email 08_group-archive-reminder is sent.

Archive old groups

Currently, unsettled groups older than 6 months and settled groups older than 3 months are archived. Premium groups are not archived.

This process runs several times a day to decrease the load on the database with a limit for the number of groups archived. The groups with highest lastChanged are archived first going further into the past.

When archival happens the users are notified via a push notification (regular Change is generated too).