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
-- Some basic initializations: HTTP connection manager, logger, and static
-- subsite.
appHttpManager <- newManager
--appHttpManager <- newManager tlsManagerSettings
appLogger <- newStdoutLoggerSet defaultBufSize >>= makeYesodLogger
appStatic <-
(if appMutableStatic appSettings then staticDevel else static)

View file

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

View file

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

View file

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