Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support aeson-2.2 #102

Merged
merged 9 commits into from
Oct 7, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/OddJobs/Job.hs
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BSL
import System.FilePath (FilePath)
import qualified System.Directory as Dir
import Data.Aeson.Internal (iparse, IResult(..), formatError)
import Prelude hiding (log)
import GHC.Exts (toList)
import Database.PostgreSQL.Simple.Types as PGS (Identifier(..))
import Database.PostgreSQL.Simple.ToField as PGS (toField)
import Data.Aeson.Types
tchoutri marked this conversation as resolved.
Show resolved Hide resolved

-- | The documentation of odd-jobs currently promotes 'startJobRunner', which
-- expects a fairly detailed 'Config' record, as a top-level function for
Expand Down Expand Up @@ -427,7 +427,7 @@ runJob jid = do
runJobWithTimeout lockTimeout job
endTime <- liftIO getCurrentTime
shouldDeleteJob <- deleteSuccessfulJobs
let newJob = job{jobStatus=Success, jobLockedBy=Nothing, jobLockedAt=Nothing, jobUpdatedAt = endTime}
let newJob = job{jobStatus=OddJobs.Types.Success, jobLockedBy=Nothing, jobLockedAt=Nothing, jobUpdatedAt = endTime}
if shouldDeleteJob
then deleteJob jid
else void $ saveJob newJob
Expand Down
16 changes: 15 additions & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
resolver: lts-20.26
resolver: lts-21.13

packages:
- .
extra-deps:
- aeson-2.2.0.0
- timing-convenience-0.1@sha256:7ff807a9a9e5596f2b18d45c5a01aefb91d4a98f6a1008d183b5c550f68f7cb7,2092
- resource-pool-0.4.0.0@sha256:9c1e448a159875e21a7e68697feee2b61a4e584720974fa465a2fa1bc0776c73,1342
- integer-conversion-0.1@sha256:9f77cc7711d3100a4483f2dd1a22f4be5b59d235a556d910d0e6c5e90a967551,2208
- text-iso8601-0.1@sha256:fc10d8de72fc094d0d299644f17421b9430d1c1092a1355c7f0c02d8b6edf6a7,2371
- th-abstraction-0.5.0.0@sha256:4351cadf6bf0ca80c90225bae0b12f4cfdd550f30c333b050186af5a8bc19457,2236
- git: https://github.com/haskell-servant/servant.git
commit: a14cd7e520816c38c267efcef43e3c10d66d0186
subdir: servant
- git: https://github.com/haskell-servant/servant.git
commit: a14cd7e520816c38c267efcef43e3c10d66d0186
subdir: servant-server
- postgresql-simple-0.6.5.1

allow-newer: true
Loading