Cleanup, fixes

This commit is contained in:
Master Kwoth
2017-10-15 10:20:49 +02:00
parent 696a0eb2a7
commit b17318d013
169 changed files with 11 additions and 19601 deletions

View File

@ -45,10 +45,9 @@ namespace NadekoBot.Core.Services
for (int i = 0; i < _creds.TotalShards; i++)
{
_defaultShardState.ShardId = i;
db.ListSetByIndex(_key + "shardstats",
i,
db.ListRightPush(_key + "_shardstats",
JsonConvert.SerializeObject(_defaultShardState),
CommandFlags.FireAndForget);
flags: CommandFlags.FireAndForget);
}
_curProcessId = Process.GetCurrentProcess().Id;
@ -73,7 +72,7 @@ namespace NadekoBot.Core.Services
var shardId = JsonConvert.DeserializeObject<int>(data);
var db = _redis.GetDatabase();
_defaultShardState.ShardId = shardId;
db.ListSetByIndex(_key + "shardstats",
db.ListSetByIndex(_key + "_shardstats",
shardId,
JsonConvert.SerializeObject(_defaultShardState),
CommandFlags.FireAndForget);
@ -96,7 +95,7 @@ namespace NadekoBot.Core.Services
if (msg == null)
return;
var db = _redis.GetDatabase();
db.ListSetByIndex(_key + "shardstats",
db.ListSetByIndex(_key + "_shardstats",
msg.ShardId,
data,
CommandFlags.FireAndForget);