funflow-1.5.0: Workflows with arrows

Safe HaskellNone



Executor for external tasks.

An executor will poll for tasks on the co-ordinator, mark them as in progress and then execute them.

You probably want to start with executeLoop.



data ExecutionResult Source #



The result already exists in the store and there is no need to execute. This is also returned if the job is already running elsewhere.


The computation is already running elsewhere. This is probably indicative of a bug, because the coordinator should only allow one instance of a task to be running at any time.

Success TimeSpec

Execution completed successfully after a certain amount of time.

Failure TimeSpec Int

Execution failed with the following exit code. TODO where should logs go?

ExecutorFailure IOException

The executor itself failed to execute the external task. E.g. because the executable was not found.

executeLoop :: forall c. Coordinator c => c -> Config c -> ContentStore -> IO () Source #

Execute tasks forever

executeLoopWithScribe :: forall c. Coordinator c => c -> Config c -> ContentStore -> Scribe -> IO () Source #

Same as executeLoop, but allows specifying a custom Scribe for logging

withFollowFile :: Path Abs File -> Handle -> IO a -> IO a Source #

withFollowFile in out follows the file in and prints contents to out as they appear. The file must exist. Doesn't handle file truncation.