From c45abd29a5e4a9146cbe94789b7b3787eb02e5a5 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Sun, 8 Jun 2025 03:50:02 -0400 Subject: fig-monitor-twitch: Log a bit more politely in liveness watcher --- fig-monitor-twitch/src/Fig/Monitor/Twitch.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fig-monitor-twitch/src/Fig/Monitor/Twitch.hs b/fig-monitor-twitch/src/Fig/Monitor/Twitch.hs index 5f97209..d4eca81 100644 --- a/fig-monitor-twitch/src/Fig/Monitor/Twitch.hs +++ b/fig-monitor-twitch/src/Fig/Monitor/Twitch.hs @@ -478,7 +478,9 @@ twitchChannelLiveMonitor cfg busAddr = do loop = do log "Updating liveness..." live <- runAuthed cfg $ usersAreLive cfg.monitor - log $ "Update complete! Live users: " <> Text.unwords (Set.toList live) + if null live + then log "Update complete! No users live" + else log $ "Update complete! Live users: " <> Text.unwords (Set.toList live) cmds.publish "monitor twitch stream online" . encodeUtf8 . Text.unwords $ Set.toList live threadDelay $ 5 * 60 * 1000000 -- wait 5 minutes loop -- cgit v1.2.3