diff --git a/src/OddJobs/Job.hs b/src/OddJobs/Job.hs index 3cd5f2c..4fc15cd 100644 --- a/src/OddJobs/Job.hs +++ b/src/OddJobs/Job.hs @@ -1,5 +1,5 @@ {-# LANGUAGE RankNTypes, FlexibleInstances, FlexibleContexts, PartialTypeSignatures, UndecidableInstances #-} -{-# LANGUAGE ExistentialQuantification, RecordWildCards, ScopedTypeVariables #-} +{-# LANGUAGE ExistentialQuantification, RecordWildCards, ScopedTypeVariables, CPP #-} module OddJobs.Job ( @@ -527,7 +527,7 @@ jobMonitor = do -- | Ref: 'jobPoller' jobPollingSql :: Query jobPollingSql = - "update ? set status = ?, locked_at = ?, locked_by = ?, attempts=attempts+1\ + "update ? set status = ?, locked_at = ?, locked_by = ?, attempts=attempts+1 \ \ WHERE id in (select id from ? where (run_at<=? AND ((status in ?) OR (status = ? and locked_at