yesod-job-queue alternatives and similar packages
Based on the "yesod" category.
Alternatively, view yesod-job-queue alternatives based on common mentions on social networks and blogs.
-
yesod-persistent
A RESTful Haskell web framework built on WAI. -
yesod-fay
Utilities for using the Fay Haskell-to-JS compiler with Yesod. -
yesod-dsl
A domain specific language and a code generator desined to create RESTful services for managing an RDBMS with Yesod web framework and Persistent. -
yesod-crud
Generic administrative CRUD operations as a Yesod subsite -
yesod-auth-hashdb
Yesod.Auth.HashDB plugin, now moved out of main yesod-auth package -
yesod-routes-typescript
generate TypeScript routes for Yesod -
yesod-auth-fb
Authentication backend for Yesod using Facebook. -
yesod-recaptcha
Dead simple support for reCAPTCHA on Yesod applications. -
yesod-content-pdf
Library for serving PDF content from a Yesod Application -
yesod-comments
Drop-in comments module for a Yesod application -
yesod-form-bootstrap4
yesod-form for bootstrap version 4 -
yesod-worker
Drop-in(ish) background worker system for Yesod applications -
yesod-transloadit
A resuable widget for the Transloadit service & Yesod -
yesod-auth-account-fork
Fork of yesod-auth-account with a few additions -
yesod-raml
Generate Yesod framework route definitions, documentaiton, mock-handler, and more from your RAML spec. -
yesod-crud-persist
Easy CRUD subsites for yesod with persistent -
yesod-auth-smbclient
Authentication plugin for Yesod using smbclient -
yesod-auth-bcrypt
BCrypt salted and hashed passwords in a database as auth for yesod -
yesod-datatables
Routines for implementing server-side processing for DataTables (jQuery grid) in Haskell -
yesod-auth-ldap-native
Yesod LDAP authentication plugin using native Haskell Ldap.Client -
yesod-fb
Useful glue functions between the fb library and Yesod. -
yesod-auth-hmac-keccak
An account authentication plugin for yesod with encrypted token transfer. -
yesod-auth-zendesk
Zendesk remote authentication support for Yesod apps. -
yesod-pnotify
yet another getMessage/setMessage using pnotify jquery plugins -
yesod-auth-deskcom
Desk.com Multipass support for Yesod apps. -
yesod-test-json
Utility functions for testing JSON web services written in Yesod -
yesod-paypal-rest
Yesod plugin to use PayPal with the paypal-rest-client library. -
yesod-articles
Automatically generate article previews for a yesod site -
yesod-s3
Simple Helper Library for using Amazon's Simple Storage Service (S3) with Yesod
Learn any GitHub repo in 59 seconds
Do you think we are missing an alternative of yesod-job-queue or a related project?
README
yesod-job-queue

Background jobs library for Yesod.
- There are API and Web UI for managing the job.
- Queue backend is Redis.
- Multithreaded.
Web interface
Usage
Prepare the JobState to manage the running jobs
import Yesod.JobQueue
data App = App {
appConnPool :: ConnectionPool
, appDBConf :: SqliteConf
, appJobState :: JobState
}
-- e.g. In makeFoundation
main = do
jobState <- newJobState -- create JobState
let app = App pool dbConf jobState
Make the routes for API & Manager UI
mkYesod "App" [parseRoutes|
/ HomeR GET
/job JobQueueR JobQueue getJobQueue -- ^ JobQueue API and Manager
|]
Define the job. And, to the setting of JobQueue
-- Your job type
data MyJobType = AggregationUser
| PushNotification
| HelloJob String
deriving (Show, Read, Generic)
-- JobQueue settings
instance YesodJobQueue App where
type JobType App = MyJobType
getJobState = appJobState
threadNumber _ = 2
runDBJob action = do -- Required if you use the DB in the job
app <- ask
runSqlPool action $ appConnPool app
-- Your Job code
runJob _ AggregationUser = do
us <- runDBJob $ selectList ([] :: [Filter Person]) []
liftIO $ threadDelay $ 10 * 1000 * 1000
print us
putStrLn "complate job!"
runJob _ PushNotification = do
putStrLn "sent norification!"
runJob _ (HelloJob name) = do
putStrLn . pack $ "Hello " ++ name
Please see example
Configration queue backend (Redis)
The default is to connect to redis localhost:6379
.
And, you can change connect info by queueConnectInfo
Build package
stack build
build javascripts (required when app/* was editted)
cd app
npm install
npm run build-js
# need again `stack build`
developping app/*
You can edit app/app.js without re-build package
npm run watch-js ## watch app/*.js for changes, automatically build.
npm run bs ## serving app.bundle.js at `http://localhost:3001/dist/app.bundle.js` for test
in example/Main.hs
. to use test version of app.bundle.js.
jobManagerJSUrl _ = "http://localhost:3001/dist/app.bundle.js"
Run example
stack build --flag yesod-job-queue:example && stack exec yesod-job-queue-example
You can access Web UI: http://localhost:3000/job/manager