Skip to content

Commit 6a9e3c3

Browse files
committed
changes after rebase
1 parent 51bcda7 commit 6a9e3c3

File tree

1 file changed

+2
-6
lines changed
  • hydra-node/src/Hydra/Network

1 file changed

+2
-6
lines changed

hydra-node/src/Hydra/Network/Etcd.hs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@ import Cardano.Binary (decodeFull', serialize')
4444
import Cardano.Crypto.Hash (SHA256, hashToStringAsHex, hashWithSerialiser)
4545
import Control.Concurrent.Class.MonadSTM (
4646
MonadLabelledSTM,
47-
labelTVarIO,
4847
modifyTVar',
49-
newTBQueueIO,
50-
newTVarIO,
5148
peekTBQueue,
5249
readTBQueue,
5350
swapTVar,
@@ -579,16 +576,15 @@ newPersistentQueue path capacity = do
579576
paths <- liftIO $ do
580577
createDirectoryIfMissing True path
581578
sort . mapMaybe readMaybe <$> listDirectory path
582-
queue <- newTBQueueIO $ max (fromIntegral $ length paths) capacity
579+
queue <- newLabelledTBQueueIO "persistent-queue" $ max (fromIntegral $ length paths) capacity
583580
highestId <-
584581
try (loadExisting queue paths) >>= \case
585582
Left (_ :: IOException) -> do
586583
-- XXX: This swallows and not logs the error
587584
liftIO $ createDirectoryIfMissing True path
588585
pure 0
589586
Right highest -> pure highest
590-
nextIx <- newTVarIO $ highestId + 1
591-
labelTVarIO nextIx "persistent-next-ix"
587+
nextIx <- newLabelledTVarIO "persistent-next-ix" $ highestId + 1
592588
pure PersistentQueue{queue, nextIx, directory = path}
593589
where
594590
loadExisting queue = \case

0 commit comments

Comments
 (0)