mirror of https://github.com/voidlizard/hbs2
better?
This commit is contained in:
parent
f11c17718f
commit
ecf5add30d
|
@ -242,15 +242,13 @@ runBurstMachine BurstMachine{..} = do
|
||||||
pause @'Seconds 600
|
pause @'Seconds 600
|
||||||
atomically $ writeTVar _buMaxReal buMax
|
atomically $ writeTVar _buMaxReal buMax
|
||||||
|
|
||||||
forever do
|
flip fix 0 $ \next e1 -> do
|
||||||
|
|
||||||
e1 <- readTVarIO _buErrors
|
|
||||||
|
|
||||||
let dt = realToFrac _buTimeout
|
let dt = realToFrac _buTimeout
|
||||||
|
|
||||||
pause @'Seconds dt
|
pause @'Seconds dt
|
||||||
|
|
||||||
atomically do
|
eNew <- atomically do
|
||||||
|
|
||||||
e2 <- readTVar _buErrors
|
e2 <- readTVar _buErrors
|
||||||
current <- readTVar _buCurrent
|
current <- readTVar _buCurrent
|
||||||
|
@ -270,6 +268,10 @@ runBurstMachine BurstMachine{..} = do
|
||||||
|
|
||||||
modifyTVar _rates ( Map.insertWith max dedt current )
|
modifyTVar _rates ( Map.insertWith max dedt current )
|
||||||
|
|
||||||
|
pure e2
|
||||||
|
|
||||||
|
next eNew
|
||||||
|
|
||||||
data S =
|
data S =
|
||||||
SInit
|
SInit
|
||||||
| SFetchQ
|
| SFetchQ
|
||||||
|
|
Loading…
Reference in New Issue