feat: store shard status in Redis

This commit is contained in:
spiral
2022-01-22 03:52:52 -05:00
parent 22faa47d00
commit 0419ced0d2
18 changed files with 602 additions and 183 deletions

View File

@@ -54,8 +54,8 @@ public class Init
logger.Information("Connecting to database");
await services.Resolve<IDatabase>().ApplyMigrations();
// if we're running single-process, clear any existing shard status from the database
await services.Resolve<ModelRepository>().ClearShardStatus();
// Clear shard status from Redis
await redis.Connection.GetDatabase().KeyDeleteAsync("pluralkit:shardstatus");
}
// Init the bot instance itself, register handlers and such to the client before beginning to connect