From 8d2667715b0508c538cf652e2dcfe2b8a47d1aff Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 30 Jul 2012 12:21:53 -0400 Subject: prune old filler alerts --- Assistant/DaemonStatus.hs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'Assistant/DaemonStatus.hs') diff --git a/Assistant/DaemonStatus.hs b/Assistant/DaemonStatus.hs index 6d05c6152..77387deb8 100644 --- a/Assistant/DaemonStatus.hs +++ b/Assistant/DaemonStatus.hs @@ -50,8 +50,6 @@ data DaemonStatus = DaemonStatus type TransferMap = M.Map Transfer TransferInfo -type AlertMap = M.Map AlertId Alert - {- This TMVar is never left empty, so accessing it will never block. -} type DaemonStatusHandle = TMVar DaemonStatus @@ -242,10 +240,5 @@ alertWhile dstatus alert a = do let alert' = alert { alertClass = Activity } i <- addAlert dstatus alert' r <- bracket_ noop noop a - updateAlertMap dstatus $ makeold i (makeAlertFiller r) + updateAlertMap dstatus $ convertToFiller i r return r - where - -- TODO prune old filler - makeold i filler m - | M.size m < 20 = M.adjust filler i m - | otherwise = M.adjust filler i m -- cgit v1.2.3