You've already forked Sonarr
mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-07-17 01:32:30 +02:00
Fixed: Prevent lack of internet from stopping all health checks from running
This commit is contained in:
@ -22,6 +22,8 @@ namespace NzbDrone.Core.HealthCheck.Checks
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override HealthCheck Check()
|
public override HealthCheck Check()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var request = _cloudRequestBuilder.Create()
|
var request = _cloudRequestBuilder.Create()
|
||||||
.Resource("/time")
|
.Resource("/time")
|
||||||
@ -37,6 +39,11 @@ namespace NzbDrone.Core.HealthCheck.Checks
|
|||||||
_logger.Error("System time mismatch. SystemTime: {0} Expected Time: {1}. Update system time", systemTime, result.DateTimeUtc);
|
_logger.Error("System time mismatch. SystemTime: {0} Expected Time: {1}. Update system time", systemTime, result.DateTimeUtc);
|
||||||
return new HealthCheck(GetType(), HealthCheckResult.Error, _localizationService.GetLocalizedString("SystemTimeHealthCheckMessage"), "#system-time-off");
|
return new HealthCheck(GetType(), HealthCheckResult.Error, _localizationService.GetLocalizedString("SystemTimeHealthCheckMessage"), "#system-time-off");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
_logger.Warn(e, "Unable to verify system time");
|
||||||
|
}
|
||||||
|
|
||||||
return new HealthCheck(GetType());
|
return new HealthCheck(GetType());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user