ihp-1.5.0: Haskell Web Framework
Safe HaskellNone
LanguageGHC2021

IHP.Job.Types.Class

Documentation

class Job job where Source #

Minimal complete definition

perform

Methods

perform :: job -> IO () Source #

maxAttempts :: Int Source #

timeoutInMicroseconds :: Maybe Int Source #

queuePollInterval :: Int Source #

While jobs are typically fetch using pg_notiy, we have to poll the queue table periodically to catch jobs with a run_at in the future

By default we only poll every minute

maxConcurrency :: Int Source #

How many jobs of this type can be executed at the same time

This limit only applies to the running haskell process. If you run N multiple independent processes of the job runner, the limit will be N * maxConcurrency

backoffStrategy :: BackoffStrategy Source #

staleJobTimeout :: Maybe NominalDiffTime Source #

How long a job can be in JobStatusRunning before it's considered stale and recovered. Set to Nothing to disable stale job recovery.

Default: 10 minutes