ci: adjust buildscript
Some checks failed
Test if Server can be built / build-server (push) Failing after 22s
Some checks failed
Test if Server can be built / build-server (push) Failing after 22s
This commit is contained in:
parent
ca8960b980
commit
3f22556a2e
2 changed files with 6 additions and 8 deletions
|
@ -95,8 +95,7 @@ public class PacketDistributorService : IHostedService
|
||||||
var packetHandlersWithId = assembly.GetTypes().AsParallel().Where(t =>
|
var packetHandlersWithId = assembly.GetTypes().AsParallel().Where(t =>
|
||||||
t is { IsClass: true, IsAbstract: false } && t
|
t is { IsClass: true, IsAbstract: false } && t
|
||||||
.GetInterfaces().Any(i =>
|
.GetInterfaces().Any(i =>
|
||||||
i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IPacketHandler<>))).ToDictionary(type =>
|
i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IPacketHandler<>))).ToDictionary(type => type.GetInterfaces().First(t =>
|
||||||
type.GetInterfaces().First(t =>
|
|
||||||
t is { IsGenericType: true } && t.GetGenericTypeDefinition() == typeof(IPacketHandler<>))
|
t is { IsGenericType: true } && t.GetGenericTypeDefinition() == typeof(IPacketHandler<>))
|
||||||
.GetGenericArguments().First().GetCustomAttribute<PacketIdAttribute>().Code);
|
.GetGenericArguments().First().GetCustomAttribute<PacketIdAttribute>().Code);
|
||||||
|
|
||||||
|
@ -129,13 +128,13 @@ public class PacketDistributorService : IHostedService
|
||||||
private void InvokePacketHandler(RawPacket item)
|
private void InvokePacketHandler(RawPacket item)
|
||||||
{
|
{
|
||||||
this.logger.PacketDequeued(item.Session.Id, item.OperationCode);
|
this.logger.PacketDequeued(item.Session.Id, item.OperationCode);
|
||||||
if (!this.deserializationMap.ContainsKey(item.OperationCode))
|
if (!this.deserializationMap.TryGetValue(item.OperationCode, out var value))
|
||||||
{
|
{
|
||||||
this.logger.PacketTypeNotFound(item.OperationCode);
|
this.logger.PacketTypeNotFound(item.OperationCode);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var packet = this.deserializationMap[item.OperationCode](item.MessageBody);
|
var packet = value(item.MessageBody);
|
||||||
this.logger.PacketData(JsonConvert.SerializeObject(packet));
|
this.logger.PacketData(JsonConvert.SerializeObject(packet));
|
||||||
this.packetHandlersInstantiation[item.OperationCode].GetType().GetMethod(nameof(IPacketHandler<IPacket>.HandleAsync))
|
this.packetHandlersInstantiation[item.OperationCode].GetType().GetMethod(nameof(IPacketHandler<IPacket>.HandleAsync))
|
||||||
?.Invoke(this.packetHandlersInstantiation[item.OperationCode], new object[] { packet, item.Session });
|
?.Invoke(this.packetHandlersInstantiation[item.OperationCode], new object[] { packet, item.Session });
|
||||||
|
|
|
@ -87,10 +87,9 @@ sealed class Build : NukeBuild
|
||||||
.SetLogin(SonarToken)
|
.SetLogin(SonarToken)
|
||||||
.SetServer(SonarHostUrl);
|
.SetServer(SonarHostUrl);
|
||||||
var sonarScannerEndSettings = new SonarScannerEndSettings()
|
var sonarScannerEndSettings = new SonarScannerEndSettings()
|
||||||
.SetProjectKey("wonderking_continuity_AYeecUUTs-PH__JrTRky")
|
|
||||||
.SetLogin(SonarToken)
|
.SetLogin(SonarToken)
|
||||||
.SetServer(SonarHostUrl);
|
.SetServer(SonarHostUrl);
|
||||||
var scannerBegin = SonarScannerTasks.SonarScannerBegin(sonarScannerSettings);
|
SonarScannerTasks.SonarScannerBegin(sonarScannerSettings);
|
||||||
DotNetTasks.DotNetBuild(settings => settings.SetNoRestore(true));
|
DotNetTasks.DotNetBuild(settings => settings.SetNoRestore(true));
|
||||||
SonarScannerTasks.SonarScannerEnd(sonarScannerEndSettings);
|
SonarScannerTasks.SonarScannerEnd(sonarScannerEndSettings);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue