Easier files

This commit is contained in:
MasseR committed 2026-11-03 15:05:18 +02:00
1 parent 6e35445090
commit 05263fed2b
2 files changed
+4 -2

No files matched your search

+2
View File
@@ -6,6 +6,8 @@ dist-newstyle
docs/superpowers/plans
*.dat
handlers.json
*.hp
*.eventlog
*.eventlog.html
+2 -2
View File
@@ -42,7 +42,7 @@ import HttpServer qualified
import Katip (KatipContext, Namespace (Namespace), Severity (..), logF, logLocM, ls, runKatipContextT, runKatipT, sl, katipAddNamespace)
import Network.Socket (withSocketsDo)
import System.Environment (getEnv, lookupEnv)
import System.FilePath ((</>))
import System.FilePath ((</>), (<.>))
import System.Metrics qualified
import Text.Read (readMaybe)
import UnliftIO.Async
@@ -81,7 +81,7 @@ runController :: forall m. (HasCallStack, MonadCatch m, KatipContext m, MonadIO
runController rootDir bus (Controller name machine) = checkpoint (Annotation name) $ katipAddNamespace ns $ do
inbound <- liftIO $ atomically (dupTChan (busInbound bus))
let workerDefinition = runMealy machine (channelHassEval @m bus)
let path = rootDir </> T.unpack name
let path = rootDir </> T.unpack name <.> "dat"
worker <-
load path workerDefinition >>= \case
Decoded a -> pure a