fix: Do not exit application when instance sync fails

pull/201/head
Robert Dailey 11 months ago
parent 77c13a7c30
commit f020459023

@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Fixed
- When using `sync`, continue processing other instances when there's a failure.
## [5.0.2] - 2023-06-24 ## [5.0.2] - 2023-06-24
### Fixed ### Fixed

@ -67,6 +67,8 @@ public class SyncProcessor : ISyncProcessor
private async Task<bool> ProcessService(ISyncSettings settings, ICollection<IServiceConfiguration> configs) private async Task<bool> ProcessService(ISyncSettings settings, ICollection<IServiceConfiguration> configs)
{ {
var failureDetected = false;
foreach (var config in configs.GetConfigsBasedOnSettings(settings)) foreach (var config in configs.GetConfigsBasedOnSettings(settings))
{ {
try try
@ -77,11 +79,11 @@ public class SyncProcessor : ISyncProcessor
catch (Exception e) catch (Exception e)
{ {
HandleException(e); HandleException(e);
return true; failureDetected = true;
} }
} }
return false; return failureDetected;
} }
private void HandleException(Exception e) private void HandleException(Exception e)

Loading…
Cancel
Save