packages feed

postgresql-simple-queue 0.1.0.0 → 0.1.0.1

raw patch · 3 files changed

+15/−6 lines, 3 filesdep ~optparse-generic

Dependency ranges changed: optparse-generic

Files

README.md view
@@ -26,3 +26,12 @@     -- Remove the payload from future processing     dequeue conn $ pId payload ```++## Installation ++```bash+stack install postgresql-simple-queue+```++## Blog+This package was discussed in the blog [Testing PostgreSQL for Fun](https://medium.com/@jonathangfischoff/testing-postgresql-for-fun-af891047e5fc)
postgresql-simple-queue.cabal view
@@ -1,5 +1,5 @@ name:                postgresql-simple-queue-version:             0.1.0.0+version:             0.1.0.1 synopsis: A PostgreSQL backed queue description:  This module utilize PostgreSQL to implement a durable queue for efficently processing arbitrary payloads which can be represented as JSON.@@ -16,15 +16,15 @@  .  >   forever $ do  >     -- Attempt get a payload or block until one is available- >     payload <- 'lock' conn+ >     payload <- lock conn  >  >     -- Perform application specifc parsing of the payload value- >     case fromJSON $ 'pValue' payload of+ >     case fromJSON $ pValue payload of  >       Success x -> sendEmail x -- Perform application specific processing  >       Error err -> logErr err  >  >     -- Remove the payload from future processing- >     'dequeue' conn $ 'pId' payload+ >     dequeue conn $ pId payload homepage:            https://github.com/jfischoff/postgresql-queue#readme license:             BSD3 license-file:        LICENSE@@ -54,7 +54,7 @@                , monad-control                , postgresql-simple-opts                , resource-pool-               , optparse-generic+               , optparse-generic >= 1.2.1                , data-default                , monad-control                , lifted-base
src/Database/PostgreSQL/Simple/Queue/Main.hs view
@@ -91,7 +91,7 @@ instance ParseRecord PartialOptions where   parseRecord      =  PartialOptions-    <$> parseFields Nothing (Just "thread-count")+    <$> parseFields Nothing (Just "thread-count") (Just 't')     <*> parseRecord  -- | Final Options used by 'run'.