packages feed

yam-servant 0.1.4 → 0.1.5

raw patch · 2 files changed

+4/−8 lines, 2 filesdep −data-default

Dependencies removed: data-default

Files

src/Yam/Servant.hs view
@@ -14,8 +14,6 @@  import           Control.Exception                 (SomeException, catch) import           Control.Lens                      hiding (Context)-import           Data.Aeson-import           Data.Default import           Data.Swagger                      hiding     ( Header     , HeaderName@@ -124,12 +122,13 @@           -> IO () startMain initialize providers migrateSql jobs application = do   context <- defaultContext >>= initialize-  runAppM context $ go `finally` killJobs+  runAppM context $ go `finally` (cleanContext killJobs)   where go :: AppM IO ()         go = do mds  <- getPropOrDefault def "datasource"                 ds2nd<- getProp              "datasource.secondary"                 conf <- getPropOrDefault def ""-                initDB providers mds ds2nd $ do+                initDataSource providers mds ds2nd $ do+                  when (migrate mds && mode conf /= Production) migrateSql                   jobs >>= mapM_ registerJob                   lockExtenstion                   context <- ask@@ -140,6 +139,4 @@                   liftIO  $ runSettings settings                           $ middleWare  context                           $ application context-        initDB :: [DataSourceProvider (AppM IO) ()] -> DataSource -> Maybe DataSource -> AppM IO () -> AppM IO ()-        initDB p v ds2 action = initDataSource p v ds2 action 
yam-servant.cabal view
@@ -1,5 +1,5 @@ name:                yam-servant-version:             0.1.4+version:             0.1.5 description:         Web Module for Yam homepage:            https://github.com/leptonyu/yam/yam-servant#readme license:             BSD3@@ -28,7 +28,6 @@                      , warp                      , aeson                      , lens-                     , data-default   default-language:    Haskell2010  source-repository head