diff --git a/Main.hs b/Main.hs index fedafb0..fee63d3 100644 --- a/Main.hs +++ b/Main.hs @@ -1,5 +1,6 @@ module Main where +import Control.Concurrent.Async (mapConcurrently_) import Control.Monad import Data.ByteString.Lazy (ByteString) import Data.ByteString.Lazy qualified as L @@ -53,7 +54,7 @@ handleArgs ["fetch"] = do , "546" -- NYC East Village , "452" -- Austin Seaholm ] - mapM_ (scrapeStore conn) stores + mapConcurrently_ (scrapeStore conn) stores printlog "done" changeCount <- SQL.totalChanges conn printlog $ "changed rows: " <> show changeCount diff --git a/traderjoes.cabal b/traderjoes.cabal index 9691671..958440c 100644 --- a/traderjoes.cabal +++ b/traderjoes.cabal @@ -12,6 +12,7 @@ executable traderjoes ghc-options: -Wall -Werror build-depends: base , aeson + , async , blaze-html , blaze-markup , bytestring