mirror of
https://github.com/Jetsparrow/jetherald.git
synced 2026-01-21 07:56:09 +03:00
Log exceptions while checking heartbeats
This commit is contained in:
parent
3e16199c1f
commit
ae4cbe0632
@ -89,6 +89,8 @@ namespace JetHerald
|
|||||||
{
|
{
|
||||||
await Task.Delay(1000 * 10, token);
|
await Task.Delay(1000 * 10, token);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
foreach (var chatSent in await Db.GetExpiredTopics(token))
|
foreach (var chatSent in await Db.GetExpiredTopics(token))
|
||||||
{
|
{
|
||||||
var formatted = $"!{chatSent.Description}!:\nTimeout expired at {chatSent.ExpiryTime}";
|
var formatted = $"!{chatSent.Description}!:\nTimeout expired at {chatSent.ExpiryTime}";
|
||||||
@ -100,6 +102,11 @@ namespace JetHerald
|
|||||||
|
|
||||||
await Db.MarkExpiredTopics(token);
|
await Db.MarkExpiredTopics(token);
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Log.LogError(e, "Exception while checking heartbeats");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task HeartbeatSent(Db.Topic topic)
|
public async Task HeartbeatSent(Db.Topic topic)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user