Remove HTTP connection manager, it's not being used

I suppose there's no performance difference in using one, but it requires
`http-conduit` as a build dependency, so potentially we may be reducing build
time by removing unnecessary deps.
This commit is contained in:
fr33domlover 2019-01-14 02:30:39 +00:00
parent 4c50a1fc96
commit 5862b03019
4 changed files with 6 additions and 7 deletions

View file

@ -89,7 +89,7 @@ makeFoundation :: AppSettings -> IO App
makeFoundation appSettings = do makeFoundation appSettings = do
-- Some basic initializations: HTTP connection manager, logger, and static -- Some basic initializations: HTTP connection manager, logger, and static
-- subsite. -- subsite.
appHttpManager <- newManager --appHttpManager <- newManager tlsManagerSettings
appLogger <- newStdoutLoggerSet defaultBufSize >>= makeYesodLogger appLogger <- newStdoutLoggerSet defaultBufSize >>= makeYesodLogger
appStatic <- appStatic <-
(if appMutableStatic appSettings then staticDevel else static) (if appMutableStatic appSettings then staticDevel else static)

View file

@ -59,7 +59,7 @@ data App = App
{ appSettings :: AppSettings { appSettings :: AppSettings
, appStatic :: Static -- ^ Settings for static file serving. , appStatic :: Static -- ^ Settings for static file serving.
, appConnPool :: ConnectionPool -- ^ Database connection pool. , appConnPool :: ConnectionPool -- ^ Database connection pool.
, appHttpManager :: Manager --, appHttpManager :: Manager
, appLogger :: Logger , appLogger :: Logger
, appMailQueue :: Maybe (Chan (MailRecipe App)) , appMailQueue :: Maybe (Chan (MailRecipe App))
, appSvgFont :: PreparedFont Double , appSvgFont :: PreparedFont Double
@ -443,7 +443,7 @@ instance YesodAuth App where
-- You can add other plugins like BrowserID, email or OAuth here -- You can add other plugins like BrowserID, email or OAuth here
authPlugins _ = [accountPlugin] authPlugins _ = [accountPlugin]
authHttpManager = getsYesod getHttpManager authHttpManager = error "authHttpManager"
onLogout = clearUnverifiedCreds False onLogout = clearUnverifiedCreds False
@ -529,8 +529,8 @@ instance RenderMessage App FormMessage where
-- An example is background jobs that send email. -- An example is background jobs that send email.
-- This can also be useful for writing code that works across multiple Yesod -- This can also be useful for writing code that works across multiple Yesod
-- applications. -- applications.
instance HasHttpManager App where --instance HasHttpManager App where
getHttpManager = appHttpManager -- getHttpManager = appHttpManager
unsafeHandler :: App -> Handler a -> IO a unsafeHandler :: App -> Handler a -> IO a
unsafeHandler = Unsafe.fakeHandlerGetLogger appLogger unsafeHandler = Unsafe.fakeHandlerGetLogger appLogger

View file

@ -21,7 +21,7 @@ import Database.Persist.Sql as Import ( SqlBackend
, SqlPersistT , SqlPersistT
, runMigration , runMigration
) )
import Network.HTTP.Client.Conduit as Import --import Network.HTTP.Client.Conduit as Import
import Network.HTTP.Types as Import import Network.HTTP.Types as Import
import Yesod as Import hiding (Header, parseTime) import Yesod as Import hiding (Header, parseTime)
import Yesod.Auth as Import import Yesod.Auth as Import

View file

@ -263,7 +263,6 @@ library
--, hjsmin --, hjsmin
-- 'git' uses it for 'GitTime' -- 'git' uses it for 'GitTime'
, hourglass , hourglass
, http-conduit
, http-types , http-types
, libravatar , libravatar
-- for converting Darcs patch hash Digest to ByteString -- for converting Darcs patch hash Digest to ByteString