mirror of https://github.com/voidlizard/hbs2
wip, log merging, debug-19
This commit is contained in:
parent
baf0d6e3b6
commit
3efe992436
|
@ -217,6 +217,7 @@ refChanWorker env brains = do
|
||||||
debug $ "ON ROUND STARTED" <+> pretty rcrk
|
debug $ "ON ROUND STARTED" <+> pretty rcrk
|
||||||
|
|
||||||
forever do
|
forever do
|
||||||
|
-- FIXME: use-polling-function-and-respect-wait
|
||||||
pause @'Seconds 30
|
pause @'Seconds 30
|
||||||
|
|
||||||
now <- getTimeCoarse
|
now <- getTimeCoarse
|
||||||
|
@ -235,9 +236,10 @@ refChanWorker env brains = do
|
||||||
when (closed || ttl <= now) do
|
when (closed || ttl <= now) do
|
||||||
lift $ expire x
|
lift $ expire x
|
||||||
|
|
||||||
forM_ trans $ \t -> do
|
when closed do
|
||||||
debug $ "WRITING TRANS" <+> pretty t
|
forM_ trans $ \t -> do
|
||||||
lift $ refChanWriteTranFn env t
|
debug $ "WRITING TRANS" <+> pretty t
|
||||||
|
lift $ refChanWriteTranFn env t
|
||||||
|
|
||||||
atomically $ modifyTVar rounds (HashSet.delete x)
|
atomically $ modifyTVar rounds (HashSet.delete x)
|
||||||
debug $ "CLEANUP ROUND" <+> pretty x
|
debug $ "CLEANUP ROUND" <+> pretty x
|
||||||
|
|
Loading…
Reference in New Issue