File tree 2 files changed +12
-1
lines changed
primer-service/exe-server
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 342
342
# These are helpful for debugging broken images.
343
343
bashInteractive
344
344
coreutils
345
+ lsof
346
+ procps
345
347
] ) ;
346
348
347
349
config =
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