Copyright | (c) digitally induced GmbH 2020 |
---|---|
Safe Haskell | None |
Synopsis
- runJobWorkers :: [JobWorker] -> Script
- dedicatedProcessMainLoop :: (?modelContext :: ModelContext, ?context :: FrameworkConfig) => [JobWorker] -> IO ()
- devServerMainLoop :: (?modelContext :: ModelContext) => FrameworkConfig -> PGListener -> [JobWorker] -> IO ()
- installSignalHandlers :: IO (IO ())
- stopExitHandler :: JobWorkerArgs -> p -> p
- worker :: (job ~ GetModelByTableName (GetTableName job), FilterPrimaryKey (GetTableName job), FromRow job, Show (PrimaryKey (GetTableName job)), FromField (PrimaryKey (GetTableName job)), KnownSymbol (GetTableName job), SetField "attemptsCount" job Int, SetField "lockedBy" job (Maybe UUID), SetField "status" job JobStatus, SetField "updatedAt" job UTCTime, HasField "runAt" job UTCTime, HasField "attemptsCount" job Int, SetField "lastError" job (Maybe Text), Job job, CanUpdate job, Show job, Table job) => JobWorker
- jobWorkerFetchAndRunLoop :: (job ~ GetModelByTableName (GetTableName job), FilterPrimaryKey (GetTableName job), FromRow job, Show (PrimaryKey (GetTableName job)), FromField (PrimaryKey (GetTableName job)), KnownSymbol (GetTableName job), SetField "attemptsCount" job Int, SetField "lockedBy" job (Maybe UUID), SetField "status" job JobStatus, SetField "updatedAt" job UTCTime, HasField "attemptsCount" job Int, SetField "lastError" job (Maybe Text), Job job, CanUpdate job, Show job, Table job) => JobWorkerArgs -> IO JobWorkerProcess
Documentation
runJobWorkers :: [JobWorker] -> Script Source #
Used by the RunJobs binary
dedicatedProcessMainLoop :: (?modelContext :: ModelContext, ?context :: FrameworkConfig) => [JobWorker] -> IO () Source #
This job worker main loop is used when the job workers are running as part of their own binary
In dev mode the IHP dev server is using the devServerMainLoop
instead. We have two main loops
as the stop handling works a different in those cases.
devServerMainLoop :: (?modelContext :: ModelContext) => FrameworkConfig -> PGListener -> [JobWorker] -> IO () Source #
installSignalHandlers :: IO (IO ()) Source #
Installs signals handlers and returns an IO action that blocks until the next sigINT or sigTERM is sent
stopExitHandler :: JobWorkerArgs -> p -> p Source #
worker :: (job ~ GetModelByTableName (GetTableName job), FilterPrimaryKey (GetTableName job), FromRow job, Show (PrimaryKey (GetTableName job)), FromField (PrimaryKey (GetTableName job)), KnownSymbol (GetTableName job), SetField "attemptsCount" job Int, SetField "lockedBy" job (Maybe UUID), SetField "status" job JobStatus, SetField "updatedAt" job UTCTime, HasField "runAt" job UTCTime, HasField "attemptsCount" job Int, SetField "lastError" job (Maybe Text), Job job, CanUpdate job, Show job, Table job) => JobWorker Source #
jobWorkerFetchAndRunLoop :: (job ~ GetModelByTableName (GetTableName job), FilterPrimaryKey (GetTableName job), FromRow job, Show (PrimaryKey (GetTableName job)), FromField (PrimaryKey (GetTableName job)), KnownSymbol (GetTableName job), SetField "attemptsCount" job Int, SetField "lockedBy" job (Maybe UUID), SetField "status" job JobStatus, SetField "updatedAt" job UTCTime, HasField "attemptsCount" job Int, SetField "lastError" job (Maybe Text), Job job, CanUpdate job, Show job, Table job) => JobWorkerArgs -> IO JobWorkerProcess Source #