Configurable path

This commit is contained in:
2022-02-10 21:47:09 +02:00
parent 1ccf953c57
commit 63411532c4
4 changed files with 14 additions and 23 deletions

View File

@ -67,9 +67,9 @@ amqpPublisher sqlConn channel exchange = Publish $ \msg -> do
, msgDeliveryMode = Just Persistent
}
defaultMain :: IO ()
defaultMain = do
conf <- readConfig "./config.dhall"
defaultMain :: FilePath -> IO ()
defaultMain path = do
conf <- readConfig path
let rabbitConnect = openConnection
(conf ^. amqp . host . T.unpacked)
(conf ^. amqp . vhost)