Add counter for failed account updates to RemoveExpiredLinkedDevicesCommand
This commit is contained in:
parent
d90dff95b1
commit
06c391cbf6
|
@ -30,6 +30,9 @@ public class RemoveExpiredLinkedDevicesCommand extends AbstractSinglePassCrawlAc
|
||||||
"removedDevices");
|
"removedDevices");
|
||||||
private static final String UPDATED_ACCOUNTS_COUNTER_NAME = name(RemoveExpiredLinkedDevicesCommand.class,
|
private static final String UPDATED_ACCOUNTS_COUNTER_NAME = name(RemoveExpiredLinkedDevicesCommand.class,
|
||||||
"updatedAccounts");
|
"updatedAccounts");
|
||||||
|
|
||||||
|
private static final String FAILED_ACCOUNT_UPDATES_COUNTER_NAME = name(RemoveExpiredLinkedDevicesCommand.class,
|
||||||
|
"failedAccountUpdates");
|
||||||
private static final Logger logger = LoggerFactory.getLogger(RemoveExpiredLinkedDevicesCommand.class);
|
private static final Logger logger = LoggerFactory.getLogger(RemoveExpiredLinkedDevicesCommand.class);
|
||||||
|
|
||||||
public RemoveExpiredLinkedDevicesCommand() {
|
public RemoveExpiredLinkedDevicesCommand() {
|
||||||
|
@ -65,8 +68,8 @@ public class RemoveExpiredLinkedDevicesCommand extends AbstractSinglePassCrawlAc
|
||||||
|
|
||||||
return accountUpdate.thenReturn(expiredDevices.size())
|
return accountUpdate.thenReturn(expiredDevices.size())
|
||||||
.onErrorResume(t -> {
|
.onErrorResume(t -> {
|
||||||
logger.warn("Failed to remove expired linked devices {}", account.getUuid(),
|
logger.warn("Failed to remove expired linked devices {}", account.getUuid(), t);
|
||||||
t);
|
Metrics.counter(FAILED_ACCOUNT_UPDATES_COUNTER_NAME).increment();
|
||||||
return Mono.empty();
|
return Mono.empty();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue