via artisan user:reync --deleted-only
Details
- Reviewers
machniak - Group Reviewers
Restricted Project - Commits
- rK9f3eb54ceae8: Metric to detect users that need a cleanup
Diff Detail
- Repository
- rK kolab
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Maybe where deleted_at < "5 seconds ago" would be better to give some slack to users deleted "right now".
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).