Check for newly-expired accounts before previously-expired accounts for metric accuracy

This commit is contained in:
Jon Chambers authored and Jon Chambers committed 2022-05-25 15:49:54 -04:00
1 parent d452e90470
commit f6235b8c08
1 file changed
+3 -3
@@ -50,10 +50,10 @@ public class AccountCleaner extends AccountDatabaseCrawlerListener {
if (isExpired(account) || needsExplicitRemoval(account)) {
final Tag deletionReason;
if (isExpired(account)) {
deletionReason = Tag.of(DELETION_REASON_TAG_NAME, "previouslyExpired");
} else {
if (needsExplicitRemoval(account)) {
deletionReason = Tag.of(DELETION_REASON_TAG_NAME, "newlyExpired");
} else {
deletionReason = Tag.of(DELETION_REASON_TAG_NAME, "previouslyExpired");
}
if (accountUpdateCount < MAX_ACCOUNT_DELETIONS_PER_CHUNK) {