Prevent synchronization issues from failing repo jobs

This commit is contained in:
Cyberboss
2018-10-05 16:43:46 -04:00
parent e56933bd54
commit ce39e8da66
@@ -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);
}