Skip to content

Commit

Permalink
FIXUP
Browse files Browse the repository at this point in the history
  • Loading branch information
paolino committed Aug 4, 2024
1 parent d25ff55 commit a7c2788
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
5 changes: 1 addition & 4 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,7 @@ steps:

- label: Mainnet Boot Sync
depends_on: linux-nix
timeout: 5
retry:
automatic:
limit: 3
timeout: 3
command: |
cd run/mainnet/nix
rm -rf logs
Expand Down
12 changes: 8 additions & 4 deletions lib/exe/lib/Cardano/Wallet/Application.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-unused-local-binds #-}

-- |
-- Copyright: © 2020 IOHK
Expand Down Expand Up @@ -338,13 +340,15 @@ serveWallet
_ <- case eUiSocket of
Left err -> do
lift $ trace $ MsgServerStartupError err
exit $ ExitFailure $ exitCodeApiServer err
error "UI server failed to start"
-- exit $ ExitFailure $ exitCodeApiServer err
Right ms -> do
case ms of
Nothing -> pure ()
Just (_port, socket) -> do
ContT $ \k ->
withAsync (startUiServer socket) $ \_ -> k ()
Just (_port, _socket) -> pure ()
-- do
-- ContT $ \k ->
-- withAsync (startUiServer socket) $ \_ -> k ()
pure ExitSuccess

eApiSocket <- bindApiSocket
Expand Down
9 changes: 5 additions & 4 deletions lib/exe/lib/Cardano/Wallet/Application/CLI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1434,23 +1434,24 @@ listenApiOption =
-- | [--ui-random-port|--ui-port=INT]
listenUiOption :: Parser (Maybe Listen)
listenUiOption =
optional $ (ListenOnPort . getPort <$> uiPortOption)
(Just ListenOnRandomPort <$ uiRandomPortOption)
<|>
(ListenOnRandomPort <$ uiRandomPortOption)
(Just . ListenOnPort . getPort <$> uiPortOption)
<|>
pure Nothing

-- | [--ui-random-port]
uiRandomPortOption :: Parser Bool
uiRandomPortOption = flag' False $ mempty
<> long "ui-random-port"
<> help "serve the wallet UI on any available port (conflicts with --ui-port)"

-- | [--ui-port=INT], default: 8091
-- | [--ui-port=INT]
uiPortOption :: Parser (Port "Wallet UI")
uiPortOption = optionT $ mempty
<> long "ui-port"
<> metavar "INT"
<> help "port used for serving the wallet UI."
<> value (Port 8_091)
<> showDefaultWith showT

-- | [--random-port]
Expand Down

0 comments on commit a7c2788

Please sign in to comment.