diff options
Diffstat (limited to 'users/Profpatsch/whatcd-resolver/src/Transmission.hs')
-rw-r--r-- | users/Profpatsch/whatcd-resolver/src/Transmission.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/users/Profpatsch/whatcd-resolver/src/Transmission.hs b/users/Profpatsch/whatcd-resolver/src/Transmission.hs index 0f62487a6c28..3238780af70f 100644 --- a/users/Profpatsch/whatcd-resolver/src/Transmission.hs +++ b/users/Profpatsch/whatcd-resolver/src/Transmission.hs @@ -61,7 +61,7 @@ getAndUpdateTransmissionTorrentsStatus :: HasField "torrentId" info Int ) => Map (Label "torrentHash" Text) info -> - (Transaction m (Map (Label "torrentHash" Text) (Label "percentDone" Percentage))) + (Transaction m (Label "knownTorrentsStale" Bool, (Map (Label "torrentHash" Text) (Label "percentDone" Percentage)))) getAndUpdateTransmissionTorrentsStatus knownTorrents = inSpan' "getAndUpdateTransmissionTorrentsStatus" $ \span -> do let fields = ["hashString", "percentDone"] actualTorrents <- @@ -82,7 +82,7 @@ getAndUpdateTransmissionTorrentsStatus knownTorrents = inSpan' "getAndUpdateTran if | Map.null toDelete -> do addEventSimple span "We know about all transmission hashes." - pure actualTorrents + pure (label @"knownTorrentsStale" False, actualTorrents) | otherwise -> inSpan' "Delete outdated transmission hashes" $ \span' -> do addAttribute span' @@ -108,7 +108,7 @@ getAndUpdateTransmissionTorrentsStatus knownTorrents = inSpan' "getAndUpdateTran WHERE transmission_torrent_hash = ANY (?::text[]) |] $ Only (toDelete & Map.keys <&> (.torrentHash) & PGArray :: PGArray Text) - pure actualTorrents + pure (label @"knownTorrentsStale" True, actualTorrents) getTransmissionTorrentsTable :: (MonadTransmission m, MonadThrow m, MonadLogger m, MonadOtel m) => m Html |