From 88d01f5b4db9d836b84855cb6a23efcf2590add1 Mon Sep 17 00:00:00 2001 From: mangoiv Date: Mon, 3 Apr 2023 12:11:51 +0200 Subject: [PATCH] [fix] move Tracing to HydraAuctionUtils --- delegate-app/HydraAuction/Delegate/Server.hs | 2 +- delegate-app/Main.hs | 2 +- hydra-auction.cabal | 6 ++---- .../Delegate => src-utils/HydraAuctionUtils}/Tracing.hs | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) rename {delegate-app/HydraAuction/Delegate => src-utils/HydraAuctionUtils}/Tracing.hs (98%) diff --git a/delegate-app/HydraAuction/Delegate/Server.hs b/delegate-app/HydraAuction/Delegate/Server.hs index 9c0ca9a1..8c70da3f 100644 --- a/delegate-app/HydraAuction/Delegate/Server.hs +++ b/delegate-app/HydraAuction/Delegate/Server.hs @@ -27,8 +27,8 @@ import Hydra.Network (IP, PortNumber) -- Hydra auction imports import HydraAuction.Delegate.Interface (DelegateResponse, FrontendRequest) -import HydraAuction.Delegate.Tracing (TracerT) import HydraAuction.Types (AuctionTerms) +import HydraAuctionUtils.Tracing (TracerT) -- | The config for the delegate server data DelegateServerConfig = DelegateServerConfig diff --git a/delegate-app/Main.hs b/delegate-app/Main.hs index ae09b537..025b7f19 100644 --- a/delegate-app/Main.hs +++ b/delegate-app/Main.hs @@ -74,10 +74,10 @@ import HydraAuction.Delegate.Server ( ServerAppT, ThreadSort (DelegateRunnerThread, QueueAuctionStageThread, WebsocketThread), ) -import HydraAuction.Delegate.Tracing (MonadTracer (trace), askTracer, runWithTracer') import HydraAuction.OnChain.Common (secondsLeftInInterval, stageToInterval) import HydraAuction.Tx.Common (currentAuctionStage, currentTimeMilliseconds) import HydraAuction.Types (AuctionTerms) +import HydraAuctionUtils.Tracing (MonadTracer (trace), askTracer, runWithTracer') {- | per websocket, a thread gets spawned which then subscribes to the broadcast channel and sends to diff --git a/hydra-auction.cabal b/hydra-auction.cabal index fe1d7319..921b7562 100644 --- a/hydra-auction.cabal +++ b/hydra-auction.cabal @@ -178,10 +178,7 @@ executable hydra-auction executable hydra-auction-delegate import: common-lang main-is: Main.hs - other-modules: - HydraAuction.Delegate.Server - HydraAuction.Delegate.Tracing - + other-modules: HydraAuction.Delegate.Server hs-source-dirs: delegate-app ghc-options: -threaded -rtsopts build-depends: @@ -243,6 +240,7 @@ library hydra-auction-utils HydraAuctionUtils.Extras.PlutusOrphans HydraAuctionUtils.Fixture HydraAuctionUtils.Monads + HydraAuctionUtils.Tracing Paths_hydra_auction build-depends: diff --git a/delegate-app/HydraAuction/Delegate/Tracing.hs b/src-utils/HydraAuctionUtils/Tracing.hs similarity index 98% rename from delegate-app/HydraAuction/Delegate/Tracing.hs rename to src-utils/HydraAuctionUtils/Tracing.hs index 781e943b..86025482 100644 --- a/delegate-app/HydraAuction/Delegate/Tracing.hs +++ b/src-utils/HydraAuctionUtils/Tracing.hs @@ -1,7 +1,7 @@ {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE RankNTypes #-} -module HydraAuction.Delegate.Tracing ( +module HydraAuctionUtils.Tracing ( -- * tracing types -- ** tracing transformer