packages feed

faktory 1.0.2.0 → 1.0.2.1

raw patch · 4 files changed

+21/−3 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,6 +1,10 @@-## [*Unreleased*](https://github.com/frontrowed/faktory_worker_haskell/compare/v1.0.2.0...main)+## [*Unreleased*](https://github.com/frontrowed/faktory_worker_haskell/compare/v1.0.2.1...main)  None++## [v1.0.2.1](https://github.com/frontrowed/faktory_worker_haskell/compare/v1.0.2.0...v1.0.2.1)++- Fix bug in `at` parsing of consumed Job payloads  ## [v1.0.2.0](https://github.com/frontrowed/faktory_worker_haskell/compare/v1.0.1.6...v1.0.2.0) 
faktory.cabal view
@@ -1,6 +1,6 @@ cabal-version:   1.18 name:            faktory-version:         1.0.2.0+version:         1.0.2.1 license:         MIT license-file:    LICENSE copyright:       2018 Freckle Education
library/Faktory/JobOptions.hs view
@@ -60,7 +60,7 @@       <$> o .:? "jobtype"       <*> o .:? "retry"       <*> o .:? "queue"-      <*> (fmap (Last . Right) <$> o .:? "at")+      <*> (fmap (Last . Left) <$> o .:? "at")       <*> o .:? "custom"  getAtFromSchedule :: JobOptions -> IO (Maybe UTCTime)
tests/FaktorySpec.hs view
@@ -8,6 +8,7 @@ import Control.Concurrent.Async import Control.Concurrent.MVar import Control.Monad.IO.Class (liftIO)+import Data.Time (getCurrentTime) import Faktory.Ent.Batch import Faktory.Job import Faktory.Producer@@ -30,6 +31,19 @@       void $ perform @Text (retry 0) producer "b"      jobs `shouldMatchList` ["a", "b", "HALT"]++  it "can push Jobs to run at a given time" $ do+    now <- getCurrentTime+    jobs <- workerTestCase $ \producer -> do+      void $ perform @Text (at now) producer "a"++    jobs `shouldMatchList` ["a", "HALT"]++  it "can push Jobs to run in a given amount of seconds" $ do+    jobs <- workerTestCase $ \producer -> do+      void $ perform @Text (in_ 0) producer "a"++    jobs `shouldMatchList` ["a", "HALT"]    it "correctly handles fetch timeouts" $ do     -- Pause longer than the fetch timeout