Page MenuHomePhorge

Metric to detect users that need a cleanup
ClosedPublic

Authored by mollekopf on Mon, Nov 18, 12:27 PM.
Tags
None
Referenced Files
F17153594: D5014.id14376.diff
Sat, Dec 7, 12:06 PM
F17142944: D5014.id14368.diff
Fri, Dec 6, 9:13 PM
Unknown Object (File)
Tue, Dec 3, 9:15 AM
Unknown Object (File)
Tue, Dec 3, 3:37 AM
Unknown Object (File)
Mon, Dec 2, 11:57 PM
Unknown Object (File)
Wed, Nov 27, 10:33 AM
Unknown Object (File)
Wed, Nov 27, 1:08 AM
Unknown Object (File)
Tue, Nov 26, 3:51 PM
Subscribers

Details

Reviewers
machniak
Group Reviewers
Restricted Project
Commits
rK9f3eb54ceae8: Metric to detect users that need a cleanup
Summary

via artisan user:reync --deleted-only

Diff Detail

Repository
rK kolab
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mollekopf created this revision.
mollekopf added a reviewer: Restricted Project.Mon, Nov 18, 12:27 PM
machniak subscribed.

Maybe where deleted_at < "5 seconds ago" would be better to give some slack to users deleted "right now".

This revision is now accepted and ready to land.Mon, Nov 18, 12:31 PM

Also, whereNot('status', '&', User::STATUS_DELETED) would probably do the same. This status is set after user deletion from LDAP/IMAP was successful.

Also, whereNot('status', '&', User::STATUS_DELETED) would probably do the same. This status is set after user deletion from LDAP/IMAP was successful.

aren't we then risking not including users that should be deleted, but where the job failed to mark the user as fully deleted? (which also needs manual cleanup I suppose?)

Take a look at App\Jobs\User\DeleteJob, it will add STATUS_DELETED after all code before passes (does not throw an exception). So, checking for missing STATUS_DELETED should be included, and probably should be enough to check just this one.

Makes sense in principle, but yields about 20k fewer entries it seems (even when filtering only for the "pushed" jobs).

This revision was automatically updated to reflect the committed changes.