Easier files
This commit is contained in:
1 parent
6e35445090
commit
05263fed2b
2 files changed
+4
-2
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user