Skip to content

[BE] Cleanup `Member.last_activity_on` and worker

Background

In [Gitlab.com] Automatic removal of dormant members (&7533) we intend to add a feature to identify and remove dormant users from Namespaces for GitLab.com

This is similar to the existing SM feature ( &5519 (closed)), but rather than deactivating users, we will remove members.

To achieve this, we will be adding a way to track member’s last activity timestamp within a namespace, so that we can identify dormant members and remove them if they've been dormant for greater than a predefined time period (e.g. 90 days).

Purpose

In [BE] Add `last_activity_on` column to Members (#461336 - closed) we added a new column, Members#last_activity_on.

The column has a default value (now()) so that we don't have member records with a nil value before [BE] Track member last activity time (#461338 - closed) is implemented.

Once that issue is complete, we can remove the default column value for this issue.


Update

Edited by Bishwa Hang Rai