amqp-utils 0.4.5.0 → 0.4.5.1
raw patch · 7 files changed
+14/−11 lines, 7 files
Files
- ChangeLog.md +4/−0
- Network/AMQP/Utils/Helpers.hs +4/−0
- README.md +1/−0
- agitprop.hs +1/−2
- amqp-utils.cabal +2/−2
- arbeite.hs +1/−3
- konsum.hs +1/−4
ChangeLog.md view
@@ -1,5 +1,9 @@ # Revision history for haskell-amqp-utils +## 0.4.5.1 -- 2020-02-19++* unify threadDelay in mainloop (reduce system load when sleeping)+ ## 0.4.5.0 -- 2020-02-10 * format with stylish-haskell
Network/AMQP/Utils/Helpers.hs view
@@ -377,3 +377,7 @@ reje envi a | (ack a) = rejectEnv envi (requeuenack a) | otherwise = return ()++-- | main loop: sleep forever or wait for an exception+sleepingBeauty :: IO (X.SomeException)+sleepingBeauty = X.catch (forever (threadDelay 600000000) >> return (X.toException $ X.ErrorCall "not reached")) return
README.md view
@@ -5,6 +5,7 @@ - git://woffs.de/git/fd/haskell-amqp-utils.git - https://woffs.de/git/fd/haskell-amqp-utils.git+- https://git.sr.ht/~woffs/haskell-amqp-utils - https://github.com/woffs/haskell-amqp-utils ## Overview
agitprop.hs view
@@ -4,7 +4,6 @@ -- generic AMQP publisher import Control.Concurrent import qualified Control.Exception as X-import Control.Monad (forever) import qualified Data.ByteString.Lazy.Char8 as BL #if MIN_VERSION_hinotify(0,3,10) import qualified Data.ByteString.Char8 as BS@@ -77,7 +76,7 @@ "." (handleEvent publishOneMsg (suffix args)) hr $ "BEGIN watching " ++ (inputFile args)- _ <- forever $ threadDelay 1000000+ sleepingBeauty >>= printparam "exception" removeWatch wd hr $ "END watching " ++ (inputFile args) else do
amqp-utils.cabal view
@@ -1,6 +1,6 @@ name: amqp-utils -version: 0.4.5.0+version: 0.4.5.1 synopsis: AMQP toolset for the command line @@ -31,7 +31,7 @@ cabal-version: >=1.10 -Tested-With: GHC ==7.10.2 || ==8.0.2 || ==8.2.2 || ==8.4.4 || >= 8.6.5+Tested-With: GHC ==7.10.2 || ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || >=8.8.4 executable konsum main-is: konsum.hs
arbeite.hs view
@@ -57,9 +57,7 @@ printparam "send acks" $ ack args printparam "requeue if rejected" $ (ack args) && (requeuenack args) hr "entering main loop"- X.catch- (forever $ threadDelay 5000000)- (\e -> printparam "exception" (e :: X.SomeException))+ sleepingBeauty >>= printparam "exception" closeConnection conn hr "connection closed"
konsum.hs view
@@ -1,7 +1,6 @@ -- generic amqp consumer import Control.Concurrent import qualified Control.Exception as X-import Control.Monad import qualified Data.Text as T import Data.Time import Data.Version (showVersion)@@ -50,9 +49,7 @@ printparam "send acks" $ ack args printparam "requeue if rejected" $ (ack args) && (requeuenack args) hr "entering main loop"- X.catch- (forever $ threadDelay 5000000)- (\e -> printparam "exception" (e :: X.SomeException))+ sleepingBeauty >>= printparam "exception" closeConnection conn hr "connection closed"