mirror of https://github.com/voidlizard/hbs2
wip, log merging, debug-14
This commit is contained in:
parent
85e72361bc
commit
e1725987c9
|
@ -151,7 +151,7 @@ instance HasProtocol L4Proto (RefChanRequest L4Proto) where
|
||||||
-- мы не можем рассылать одинаковые сообщения никогда,
|
-- мы не можем рассылать одинаковые сообщения никогда,
|
||||||
-- ну или хотя бы не чаще, чем раз в 10 минут.
|
-- ну или хотя бы не чаще, чем раз в 10 минут.
|
||||||
-- но poll у нас в минутах, и с минимальным периодом 1 минута
|
-- но poll у нас в минутах, и с минимальным периодом 1 минута
|
||||||
requestPeriodLim = ReqLimPerMessage 60
|
requestPeriodLim = ReqLimPerMessage 1
|
||||||
|
|
||||||
instance Expires (SessionKey L4Proto (BlockInfo L4Proto)) where
|
instance Expires (SessionKey L4Proto (BlockInfo L4Proto)) where
|
||||||
expiresIn _ = Just defCookieTimeoutSec
|
expiresIn _ = Just defCookieTimeoutSec
|
||||||
|
|
|
@ -442,14 +442,8 @@ logMergeProcess _ q = do
|
||||||
|
|
||||||
current <- lift $ readLog sto (HashRef h) <&> HashSet.fromList
|
current <- lift $ readLog sto (HashRef h) <&> HashSet.fromList
|
||||||
|
|
||||||
forM_ current $ \t -> do
|
trans <- filter (not . flip HashSet.member current) . mconcat <$> mapM (lift . readLog sto) logs
|
||||||
debug $ "FUCKING CURRENT" <+> pretty t
|
-- trans <- mconcat <$> mapM (lift . readLog sto) logs
|
||||||
|
|
||||||
-- trans <- filter (not . flip HashSet.member current) . mconcat <$> mapM (lift . readLog sto) logs
|
|
||||||
trans <- mconcat <$> mapM (lift . readLog sto) logs
|
|
||||||
|
|
||||||
forM_ trans $ \t -> do
|
|
||||||
debug $ "FUCKING TRANS" <+> pretty t
|
|
||||||
|
|
||||||
guard (not $ List.null trans)
|
guard (not $ List.null trans)
|
||||||
|
|
||||||
|
@ -522,3 +516,4 @@ logMergeProcess _ q = do
|
||||||
|
|
||||||
updateRef sto chanKey nref
|
updateRef sto chanKey nref
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue