From ce39e8da66c2739e992e1a3110b68d60c03c1d14 Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Fri, 5 Oct 2018 16:43:46 -0400 Subject: [PATCH] Prevent synchronization issues from failing repo jobs --- .../Components/Repository/Repository.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Tgstation.Server.Host/Components/Repository/Repository.cs b/src/Tgstation.Server.Host/Components/Repository/Repository.cs index 6608fcd753..d9d0daaa8d 100644 --- a/src/Tgstation.Server.Host/Components/Repository/Repository.cs +++ b/src/Tgstation.Server.Host/Components/Repository/Repository.cs @@ -381,6 +381,10 @@ namespace Tgstation.Server.Host.Components.Repository { cancellationToken.ThrowIfCancellationRequested(); } + catch(LibGit2SharpException e) + { + logger.LogWarning("Unable to push to temporary branch! Exception: {0}", e); + } } finally { @@ -581,6 +585,11 @@ namespace Tgstation.Server.Host.Components.Repository cancellationToken.ThrowIfCancellationRequested(); throw new InvalidOperationException("Caught UserCancelledException without cancellationToken triggering", e); } + catch (LibGit2SharpException e) + { + logger.LogWarning("Unable to make synchronization push! Exception: {0}", e); + return false; + } }, cancellationToken, TaskCreationOptions.LongRunning, TaskScheduler.Current).ConfigureAwait(false); }