diff options
author | joe <joe@jerkface.net> | 2018-06-17 16:23:19 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2018-06-17 16:24:12 -0400 |
commit | bf49988d6d1852892ed6ce874c4e5937e51ba5d1 (patch) | |
tree | fac54f0f7a2faede01e848956da2aa706e98e94d /Announcer.hs | |
parent | 114b7e4424de69dc5544fe93ca4c7df6a7618f0a (diff) |
Announcer: Removed dead code (SearchFinished case).
Diffstat (limited to 'Announcer.hs')
-rw-r--r-- | Announcer.hs | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/Announcer.hs b/Announcer.hs index 0a731efa..9558e3eb 100644 --- a/Announcer.hs +++ b/Announcer.hs | |||
@@ -58,7 +58,6 @@ unpackAnnounceKey _ (AnnounceKey bs) = return $ Char8.unpack bs | |||
58 | data ScheduledItem | 58 | data ScheduledItem |
59 | = DeleteAnnouncement | 59 | = DeleteAnnouncement |
60 | | NewAnnouncement (STM (IO ())) (IO ()) (IO ()) POSIXTime | 60 | | NewAnnouncement (STM (IO ())) (IO ()) (IO ()) POSIXTime |
61 | | SearchFinished (IO ()) (IO ()) POSIXTime | ||
62 | | Announce (STM (IO ())) (IO ()) POSIXTime | 61 | | Announce (STM (IO ())) (IO ()) POSIXTime |
63 | | SearchResult (STM (IO ())) | 62 | | SearchResult (STM (IO ())) |
64 | | StopAnnouncer | 63 | | StopAnnouncer |
@@ -73,10 +72,9 @@ data ScheduledItem | |||
73 | itemStatusNum :: ScheduledItem -> Int | 72 | itemStatusNum :: ScheduledItem -> Int |
74 | itemStatusNum (DeleteAnnouncement ) = 0 | 73 | itemStatusNum (DeleteAnnouncement ) = 0 |
75 | itemStatusNum (NewAnnouncement {}) = 1 | 74 | itemStatusNum (NewAnnouncement {}) = 1 |
76 | itemStatusNum (SearchFinished {}) = 2 | 75 | itemStatusNum (Announce {}) = 2 |
77 | itemStatusNum (Announce {}) = 3 | 76 | itemStatusNum (SearchResult {}) = 3 |
78 | itemStatusNum (SearchResult {}) = 4 | 77 | itemStatusNum (StopAnnouncer ) = 4 |
79 | itemStatusNum (StopAnnouncer ) = 5 | ||
80 | itemStatusNum _ = error "itemStatusNum not in sync with ScheduledItem declaration." | 78 | itemStatusNum _ = error "itemStatusNum not in sync with ScheduledItem declaration." |
81 | 79 | ||
82 | data Announcer = Announcer | 80 | data Announcer = Announcer |
@@ -294,11 +292,6 @@ performScheduledItem announcer now = \case | |||
294 | hPutStrLn stderr $ "This print avoids negative-time future scheduling. Weird bug. TODO: fix it. "++show now | 292 | hPutStrLn stderr $ "This print avoids negative-time future scheduling. Weird bug. TODO: fix it. "++show now |
295 | announce | 293 | announce |
296 | 294 | ||
297 | -- search finished: | ||
298 | -- if any of the current storing-nodes set have not been | ||
299 | -- announced to, announce to them. | ||
300 | (Binding _ (SearchFinished {- st -} search announce interval) _) -> return $ Just $ return () | ||
301 | |||
302 | (Binding _ (SearchResult action) _) -> Just <$> action | 295 | (Binding _ (SearchResult action) _) -> Just <$> action |
303 | 296 | ||
304 | 297 | ||