fix purge user gauges

This commit is contained in:
Stanley Dimant
2022-08-30 17:21:50 +02:00
parent 1fce2ac8d6
commit f56b643d4d

View File

@@ -141,8 +141,8 @@ namespace MareSynchronosServices
_logger.LogInformation("User purged: {uid}", user.UID); _logger.LogInformation("User purged: {uid}", user.UID);
metrics.DecGauge(MetricsAPI.GaugePairs, ownPairData.Count + otherPairData.Count); metrics.DecGauge(MetricsAPI.GaugePairs, ownPairData.Count + otherPairData.Count);
metrics.DecGauge(MetricsAPI.GaugePairsPaused, ownPairData.Count + ownPairData.Count(c => c.IsPaused)); metrics.DecGauge(MetricsAPI.GaugePairsPaused, ownPairData.Count(c => c.IsPaused) + otherPairData.Count(c => c.IsPaused);
metrics.DecGauge(MetricsAPI.GaugeUsersRegistered, ownPairData.Count + 1); metrics.DecGauge(MetricsAPI.GaugeUsersRegistered, 1);
dbContext.RemoveRange(otherPairData); dbContext.RemoveRange(otherPairData);
dbContext.Remove(auth); dbContext.Remove(auth);