Commit 1ce548b 1 parent 7e956c7 commit 1ce548b Copy full SHA for 1ce548b
File tree 1 file changed +10
-1
lines changed
primer-service/exe-server
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,10 @@ import Primer.Server (
57
57
)
58
58
import StmContainers.Map qualified as StmMap
59
59
import System.Environment (lookupEnv )
60
+ import System.IO (
61
+ BufferMode (LineBuffering ),
62
+ hSetBuffering ,
63
+ )
60
64
61
65
{- HLINT ignore GlobalOptions "Use newtype instead of data" -}
62
66
data GlobalOptions = GlobalOptions
@@ -189,7 +193,12 @@ run opts = case cmd opts of
189
193
runDb (Db. ServiceCfg dbOpQueue ver) db
190
194
191
195
main :: IO ()
192
- main = execParser opts >>= run
196
+ main = do
197
+ -- It's common in Linux containers to log to stdout, so let's ensure
198
+ -- it's line-buffered, as we can't guarantee what the GHC runtime
199
+ -- will do by default.
200
+ hSetBuffering stdout LineBuffering
201
+ execParser opts >>= run
193
202
where
194
203
opts =
195
204
info
You can’t perform that action at this time.
0 commit comments