mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-13 17:20:14 +00:00
refactor: only pass shard ID to event handlers instead of full shard object
This commit is contained in:
parent
bf80dd0988
commit
50a24f03a7
13 changed files with 74 additions and 70 deletions
|
|
@ -20,9 +20,9 @@ public class SerilogGatewayEnricherFactory
|
|||
_botConfig = botConfig;
|
||||
}
|
||||
|
||||
public async Task<ILogEventEnricher> GetEnricher(Shard shard, IGatewayEvent evt)
|
||||
public async Task<ILogEventEnricher> GetEnricher(int shardId, IGatewayEvent evt)
|
||||
{
|
||||
var props = new List<LogEventProperty> { new("ShardId", new ScalarValue(shard.ShardId)) };
|
||||
var props = new List<LogEventProperty> { new("ShardId", new ScalarValue(shardId)) };
|
||||
|
||||
if (_botConfig.Cluster != null)
|
||||
props.Add(new LogEventProperty("ClusterId", new ScalarValue(_botConfig.Cluster.NodeName)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue