mirror of
https://github.com/NoiTheCat/BirthdayBot.git
synced 2024-11-21 13:54:36 +00:00
Fix instances not starting if first shard is not 0
This commit is contained in:
parent
febfd27ece
commit
9cb2e3250f
1 changed files with 2 additions and 2 deletions
|
@ -120,7 +120,7 @@ class ShardManager : IDisposable {
|
|||
var shardStatuses = new StringBuilder();
|
||||
var nullShards = new List<int>();
|
||||
var deadShards = new List<int>();
|
||||
for (var i = 0; i < _shards.Count; i++) {
|
||||
foreach (var i in _shards.Keys) {
|
||||
shardStatuses.Append($"Shard {i:00}: ");
|
||||
|
||||
if (_shards[i] == null) {
|
||||
|
@ -137,7 +137,7 @@ class ShardManager : IDisposable {
|
|||
var lastRun = DateTimeOffset.UtcNow - shard.LastBackgroundRun;
|
||||
if (lastRun > DeadShardThreshold / 3) {
|
||||
// Formerly known as a 'slow' shard
|
||||
shardStatuses.Append($", heartbeat {Math.Floor(lastRun.TotalMinutes):00}m ago.");
|
||||
shardStatuses.Append($", heartbeat {lastRun.TotalMinutes:00.0}m ago.");
|
||||
} else {
|
||||
shardStatuses.Append('.');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue