mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-15 19:22:19 +08:00
parent
27d1a18bae
commit
a993fca683
|
@ -15,7 +15,7 @@ namespace BililiveRecorder.Core
|
|||
{
|
||||
private static readonly ILogger logger = Log.ForContext<PollyPolicy>();
|
||||
|
||||
internal PollyPolicy()
|
||||
public PollyPolicy()
|
||||
{
|
||||
this.IpBlockedHttp412CircuitBreakerPolicy = Policy
|
||||
.Handle<Http412Exception>()
|
||||
|
@ -68,7 +68,6 @@ namespace BililiveRecorder.Core
|
|||
this[PolicyNames.PolicyRoomInfoApiRequestAsync] = Policy.WrapAsync(bulkhead, retry, this.IpBlockedHttp412CircuitBreakerPolicy, this.RequestFailedCircuitBreakerPolicy);
|
||||
this[PolicyNames.PolicyDanmakuApiRequestAsync] = Policy.WrapAsync(cachePolicy, bulkhead, retry, this.IpBlockedHttp412CircuitBreakerPolicy, this.RequestFailedCircuitBreakerPolicy);
|
||||
this[PolicyNames.PolicyStreamApiRequestAsync] = Policy.WrapAsync(bulkhead, retry, this.IpBlockedHttp412CircuitBreakerPolicy, this.RequestFailedCircuitBreakerPolicy);
|
||||
|
||||
}
|
||||
|
||||
public readonly MemoryCache memoryCache;
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace BililiveRecorder.Core
|
|||
private DateTimeOffset danmakuClientConnectTime;
|
||||
private static readonly TimeSpan danmakuClientReconnectNoDelay = TimeSpan.FromMinutes(1);
|
||||
|
||||
internal Room(IServiceScope scope, RoomConfig roomConfig, int initDelayFactor, ILogger logger, IDanmakuClient danmakuClient, IApiClient apiClient, IBasicDanmakuWriter basicDanmakuWriter, IRecordTaskFactory recordTaskFactory)
|
||||
public Room(IServiceScope scope, RoomConfig roomConfig, int initDelayFactor, ILogger logger, IDanmakuClient danmakuClient, IApiClient apiClient, IBasicDanmakuWriter basicDanmakuWriter, IRecordTaskFactory recordTaskFactory)
|
||||
{
|
||||
this.scope = scope ?? throw new ArgumentNullException(nameof(scope));
|
||||
this.RoomConfig = roomConfig ?? throw new ArgumentNullException(nameof(roomConfig));
|
||||
|
|
|
@ -280,7 +280,7 @@ namespace BililiveRecorder.WPF
|
|||
|
||||
private class SentryEventProcessor : ISentryEventProcessor
|
||||
{
|
||||
private const string JintConsole = "Core.Scripting.Runtime.JintConsole";
|
||||
private const string JintConsole = "BililiveRecorder.Core.Scripting.Runtime.JintConsole";
|
||||
private static readonly string UserScriptRunner = typeof(Core.Scripting.UserScriptRunner).FullName;
|
||||
public SentryEvent? Process(SentryEvent e) => (e?.Logger == JintConsole || e?.Logger == UserScriptRunner) ? null : e;
|
||||
}
|
||||
|
|
|
@ -404,6 +404,7 @@ namespace BililiveRecorder.Core
|
|||
public readonly Polly.CircuitBreaker.AsyncCircuitBreakerPolicy IpBlockedHttp412CircuitBreakerPolicy;
|
||||
public readonly Polly.CircuitBreaker.AsyncCircuitBreakerPolicy RequestFailedCircuitBreakerPolicy;
|
||||
public readonly Microsoft.Extensions.Caching.Memory.MemoryCache memoryCache;
|
||||
public PollyPolicy() { }
|
||||
}
|
||||
public class RoomStats : System.ComponentModel.INotifyPropertyChanged
|
||||
{
|
||||
|
@ -488,4 +489,4 @@ namespace BililiveRecorder.DependencyInjection
|
|||
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddRecorderConfig(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, BililiveRecorder.Core.Config.V3.ConfigV3 config) { }
|
||||
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddRecorderRecording(this Microsoft.Extensions.DependencyInjection.IServiceCollection services) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,8 @@ namespace BililiveRecorder.Core.UnitTests
|
|||
{
|
||||
VerifierSettings.DerivePathInfo(Expectations.Initialize);
|
||||
VerifierSettings.ModifySerialization(_ => _.IgnoreMembersWithType<Stream>());
|
||||
DiffRunner.Disabled = true;
|
||||
DiffRunner.Disabled = false;
|
||||
DiffTools.UseOrder(DiffTool.VisualStudioCode, DiffTool.Rider, DiffTool.WinMerge, DiffTool.VisualStudio);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,8 @@ namespace BililiveRecorder.Flv.Tests
|
|||
{
|
||||
VerifierSettings.DerivePathInfo(Expectations.Initialize);
|
||||
VerifierSettings.ModifySerialization(_ => _.IgnoreMembersWithType<Stream>());
|
||||
DiffRunner.Disabled = true;
|
||||
DiffRunner.Disabled = false;
|
||||
DiffTools.UseOrder(DiffTool.VisualStudioCode, DiffTool.Rider, DiffTool.WinMerge, DiffTool.VisualStudio);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user