This commit is contained in:
voidlizard 2024-11-06 09:50:28 +03:00
parent f11c17718f
commit ecf5add30d
1 changed files with 6 additions and 4 deletions

View File

@ -242,15 +242,13 @@ runBurstMachine BurstMachine{..} = do
pause @'Seconds 600
atomically $ writeTVar _buMaxReal buMax
forever do
e1 <- readTVarIO _buErrors
flip fix 0 $ \next e1 -> do
let dt = realToFrac _buTimeout
pause @'Seconds dt
atomically do
eNew <- atomically do
e2 <- readTVar _buErrors
current <- readTVar _buCurrent
@ -270,6 +268,10 @@ runBurstMachine BurstMachine{..} = do
modifyTVar _rates ( Map.insertWith max dedt current )
pure e2
next eNew
data S =
SInit
| SFetchQ