Shard coordinator is not indepentent from the shard 0

This commit is contained in:
Master Kwoth
2017-10-10 18:24:36 +02:00
parent 0bacb1f780
commit db6fa9af1a
14 changed files with 225 additions and 210 deletions

View File

@ -1,28 +0,0 @@
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using NadekoBot.Services;
using StackExchange.Redis;
namespace NadekoBot.Common.ShardCom
{
public class ShardComClient
{
private readonly IDataCache _cache;
public ShardComClient(IDataCache cache)
{
_cache = cache;
}
public async Task Send(ShardComMessage data)
{
var sub = _cache.Redis.GetSubscriber();
var msg = JsonConvert.SerializeObject(data);
await sub.PublishAsync("shardcoord_send", msg).ConfigureAwait(false);
}
}
}