Skip to content

Commit

Permalink
WIP commit
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabhnanda committed Oct 10, 2023
1 parent 6c238b8 commit 8adcac5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/OddJobs/Job.hs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ module OddJobs.Job
, throwParsePayload
, eitherParsePayloadWith
, throwParsePayloadWith
, noJobResult
)
where

Expand Down Expand Up @@ -402,8 +401,8 @@ runJob jid = do
onJobStart job
runJobWithTimeout lockTimeout job
endTime <- liftIO getCurrentTime
shouldDeleteJob <- immediateJobDeletion >>= (\fn -> liftIO $ fn newJob)
let newJob = job{jobStatus=OddJobs.Types.Success, jobLockedBy=Nothing, jobLockedAt=Nothing, jobUpdatedAt = endTime}
shouldDeleteJob <- immediateJobDeletion >>= (\fn -> liftIO $ fn newJob)
if shouldDeleteJob
then deleteJob jid
else void $ saveJob newJob
Expand Down

0 comments on commit 8adcac5

Please sign in to comment.