Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- data Job
- data JobResult
- type ShellCommand = String
- newJob :: FileEvent -> NonEmpty ShellCommand -> STM Job
- runJob :: Job -> IO JobResult
- restartJob :: Job -> STM ()
- unrestartJob :: Job -> STM ()
- shouldRestartJob :: Job -> STM ()
Documentation
type ShellCommand = String Source #
runJob :: Job -> IO JobResult Source #
Run a Job's list of shell commands sequentially. If a command returns ExitFailure, or an exception is thrown, don't run the rest (but also don't propagate the exception). Return whether or not all commands completed successfully.
restartJob :: Job -> STM () Source #
unrestartJob :: Job -> STM () Source #
Clear any previous restart "ping"s that were sent to this job while it was sitting in the job queue (not at the front).
shouldRestartJob :: Job -> STM () Source #
An STM action that returns when this job should be restarted, and retries otherwise.