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

This commit is contained in:
Jon Chambers 2022-05-25 15:07:53 -04:00 committed by Jon Chambers
parent d452e90470
commit f6235b8c08
1 changed files with 3 additions and 3 deletions

View File

@ -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) {