Log exceptions while checking heartbeats

This commit is contained in:
Basique Evangelist 2021-04-21 21:11:03 +03:00
parent 3e16199c1f
commit ae4cbe0632

View File

@ -89,6 +89,8 @@ namespace JetHerald
{
await Task.Delay(1000 * 10, token);
try
{
foreach (var chatSent in await Db.GetExpiredTopics(token))
{
var formatted = $"!{chatSent.Description}!:\nTimeout expired at {chatSent.ExpiryTime}";
@ -100,6 +102,11 @@ namespace JetHerald
await Db.MarkExpiredTopics(token);
}
catch (Exception e)
{
Log.LogError(e, "Exception while checking heartbeats");
}
}
}
public async Task HeartbeatSent(Db.Topic topic)