From f020459023a781872fd8dd029ed939e9288fc8a1 Mon Sep 17 00:00:00 2001 From: Robert Dailey Date: Sun, 25 Jun 2023 14:19:58 -0500 Subject: [PATCH] fix: Do not exit application when instance sync fails --- CHANGELOG.md | 4 ++++ src/Recyclarr.Cli/Processors/Sync/SyncProcessor.cs | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 049c6917..869784e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- When using `sync`, continue processing other instances when there's a failure. + ## [5.0.2] - 2023-06-24 ### Fixed diff --git a/src/Recyclarr.Cli/Processors/Sync/SyncProcessor.cs b/src/Recyclarr.Cli/Processors/Sync/SyncProcessor.cs index 7448ac92..5783f9ae 100644 --- a/src/Recyclarr.Cli/Processors/Sync/SyncProcessor.cs +++ b/src/Recyclarr.Cli/Processors/Sync/SyncProcessor.cs @@ -67,6 +67,8 @@ public class SyncProcessor : ISyncProcessor private async Task ProcessService(ISyncSettings settings, ICollection configs) { + var failureDetected = false; + foreach (var config in configs.GetConfigsBasedOnSettings(settings)) { try @@ -77,11 +79,11 @@ public class SyncProcessor : ISyncProcessor catch (Exception e) { HandleException(e); - return true; + failureDetected = true; } } - return false; + return failureDetected; } private void HandleException(Exception e)