on master help sign in
Updates to configuration

Note that we currently depend on a prerelease version of bloodhound which makes a type-incompatible change (doesn't export BHEnv). We will need to hold off until that release of bloodhound before releasing katip-elasticsearch.

commit00f7f7e0ed4e839800038c289c9e924b0fd60e29 authorMichael Xavier <michael@michaelxavier.net> dateWed 2 Mar 2016, 10:10 (11 years ago) parent620eaf3
2 files changed+5−13
katip-elasticsearch/katip-elasticsearch.cabal+1−1 katip-elasticsearch/src/Katip/Scribes/ElasticSearch.hs+4−12
katip-elasticsearch/katip-elasticsearch.cabal+1−1
@@ -46,7 +46,7 @@ library
4646 build-depends:
4747 base >=4.6 && <5
4848 , katip
49− , bloodhound >= 0.7.0.1 && < 0.11
49+ , bloodhound >= 0.10.0.0 && < 0.11
5050 , random >= 1.0 && < 1.2
5151 , uuid >= 1.3 && < 1.4
5252 , aeson >=0.6 && <0.11
katip-elasticsearch/src/Katip/Scribes/ElasticSearch.hs+4−12
@@ -13,7 +13,6 @@ module Katip.Scribes.ElasticSearch
1313 , EsPoolSize
1414 , mkEsPoolSize
1515 , EsScribeCfg
16− , essManagerSettings
1716 , essRetryPolicy
1817 , essQueueSize
1918 , essPoolSize
@@ -65,9 +64,7 @@ import Katip.Scribes.ElasticSearch.Annotations
6564
6665
6766data EsScribeCfg = EsScribeCfg {
68− essManagerSettings :: ManagerSettings
69− -- ^ Connection manager settings
70− , essRetryPolicy :: RetryPolicy
67+ essRetryPolicy :: RetryPolicy
7168 -- ^ Retry policy when there are errors sending logs to the server
7269 , essQueueSize :: EsQueueSize
7370 -- ^ Maximum size of the bounded log queue
@@ -106,8 +103,7 @@ data EsScribeCfg = EsScribeCfg {
106103-- * DailyIndexSharding
107104defaultEsScribeCfg :: EsScribeCfg
108105defaultEsScribeCfg = EsScribeCfg {
109− essManagerSettings = defaultManagerSettings
110− , essRetryPolicy = exponentialBackoff 25 <> limitRetries 5
106+ essRetryPolicy = exponentialBackoff 25 <> limitRetries 5
111107 , essQueueSize = EsQueueSize 1000
112108 , essPoolSize = EsPoolSize 2
113109 , essAnnotateTypes = False
@@ -238,7 +234,7 @@ instance Exception EsScribeSetupError
238234-------------------------------------------------------------------------------
239235mkEsScribe
240236 :: EsScribeCfg
241− -> Server
237+ -> BHEnv
242238 -> IndexName
243239 -- ^ Treated as a prefix if index sharding is enabled
244240 -> MappingName
@@ -246,12 +242,8 @@ mkEsScribe
246242 -> Verbosity
247243 -> IO (Scribe, IO ())
248244 -- ^ Returns a finalizer that will gracefully flush all remaining logs before shutting down workers
249−mkEsScribe cfg@EsScribeCfg {..} server ix mapping sev verb = do
245+mkEsScribe cfg@EsScribeCfg {..} env ix mapping sev verb = do
250246 q <- newTBMQueueIO $ unEsQueueSize essQueueSize
251− mgr <- newManager essManagerSettings
252− let env = BHEnv { bhServer = server
253− , bhManager = mgr
254− }
255247 endSig <- newEmptyMVar
256248
257249 runBH env $ do