homepage: ''
changelog-type: ''
hash: 6c5f9da30c41c59c680b76dd0f608095f20934a9c2d5012c8b19411e36489c06
test-bench-deps: {}
maintainer: gilmi@posteo.net
synopsis: A library for creating a jobs management website running custom jobs.
changelog: ''
basic-deps:
  Spock: -any
  lucid: -any
  bytestring: -any
  pretty-relative-time: -any
  stm: -any
  base: ! '>=4.7 && <5'
  time: -any
  text: -any
  digestive-functors: -any
  Spock-digestive: -any
  Spock-lucid: -any
  containers: -any
  hvect: -any
  mtl: -any
  file-embed: -any
  transformers: -any
  deepseq: -any
  http-types: -any
  digestive-functors-lucid: -any
all-versions:
- 0.1.0.0
author: Gil Mizrahi
latest: 0.1.0.0
description-type: markdown
description: |
  Jobs UI is a UI system for queuing and running custom IO Jobs.

  > License: Apache License 2.0

  ![Example image](view.png)

  ## Deps

  This package uses hpack and stack.

  ## Usage

  [See the example project](https://gitlab.com/gilmi/jobs-ui/tree/master/example/Main.hs).

  Define your own custom jobs using the `JobInfo` type:

  ```hs
  data JobInfo a
    = JobInfo
    { jiType :: T.Text -- ^ The name of the job type.
    , jiInputs :: [Param] -- ^ Definition of user parameters.
    , jiParams :: a -> [T.Text]
      -- ^ Conversion from the job payload structure to presentable parameters.
    , jiConstructor :: [(T.Text, T.Text)] -> IO a
      -- ^ Construct a payload type from user entered parameters.
    , jiExec :: a -> IO T.Text
      -- ^ How to execute a job. Returns a presentable Html when the job succeeds.
    , jiNotify :: a -> (Result T.Text T.Text) -> IO ()
      -- ^ Will be run when job ends.
    }
  ```

  Wrap it in the `JobType` constructor, and pass it to the `run :: [JobType] -> IO ()`.
license-name: Apache-2.0

Update from Hackage at 2019-12-21T09:22:57Z
Update from Hackage at 2019-12-21T09:22:57Z
