diff options
| author | Ben Sima <ben@bensima.com> | 2025-12-19 22:44:00 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-12-19 22:44:00 -0500 |
| commit | 104257d8667893a09f2c681c808804754cd5d929 (patch) | |
| tree | 45bcf9fe40920687dc5ebe5ac615645256c0e938 | |
| parent | edd856cdfb30ce6329eba0f49ed5fe978d42daa0 (diff) | |
fix(ava): use Memory database path for trace web server
Traces are inserted via Memory.withMemoryDb but web server was using
a different path (AVA_DATA_ROOT/ava.db). Now both use getMemoryDbPath.
| -rwxr-xr-x | Omni/Ava.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Omni/Ava.hs b/Omni/Ava.hs index 6058425..035c393 100755 --- a/Omni/Ava.hs +++ b/Omni/Ava.hs @@ -30,6 +30,7 @@ import qualified Data.Text as Text import qualified Data.Text.IO as TextIO import qualified Data.Time as Time import qualified Omni.Agent.AuditLog as AuditLog +import qualified Omni.Agent.Memory as Memory import qualified Omni.Agent.Telegram as Telegram import qualified Omni.Ava.Web as Web import qualified Omni.Cli as Cli @@ -78,8 +79,7 @@ move args = do then showLogs args else do webPort <- Environment.lookupEnv "AVA_WEB_PORT" /> maybe Web.defaultPort (fromMaybe Web.defaultPort <. readMaybe) - dataRoot <- Environment.getEnv "AVA_DATA_ROOT" - let dbPath = dataRoot <> "/ava.db" + dbPath <- Memory.getMemoryDbPath _ <- Concurrent.forkIO <| Web.startWebServer webPort dbPath let maybeToken = fmap Text.pack (Cli.getArg args (Cli.longOption "token")) Telegram.startBot maybeToken |
