yesod-worker alternatives and similar packages
Based on the "yesod" category.
Alternatively, view yesod-worker 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-comments
Drop-in comments module for a Yesod application -
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-form-bootstrap4
yesod-form for bootstrap version 4 -
yesod-raml
Generate Yesod framework route definitions, documentaiton, mock-handler, and more from your RAML spec. -
yesod-transloadit
A resuable widget for the Transloadit service & Yesod -
yesod-crud-persist
Easy CRUD subsites for yesod with persistent -
yesod-auth-account-fork
Fork of yesod-auth-account with a few additions -
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-test-json
Utility functions for testing JSON web services written in Yesod -
yesod-auth-hmac-keccak
An account authentication plugin for yesod with encrypted token transfer. -
yesod-auth-ldap-native
Yesod LDAP authentication plugin using native Haskell Ldap.Client -
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-paypal-rest
Yesod plugin to use PayPal with the paypal-rest-client library. -
yesod-articles
Automatically generate article previews for a yesod site -
yesod-examples
Example programs using the Yesod Web Framework. (deprecated)
WorkOS - The modern identity platform for B2B SaaS
Do you think we are missing an alternative of yesod-worker or a related project?
README
A Sidekiq-compatible background worker system, built on Keenser and using Redis for job persistence
Usage
See the demo for an example setup
Define Your Jobs
In e.g. Jobs.hs
import Yesod.Worker
blah :: Worker Handler (Text, Int)
-- Worker name (should be unique), queue name, then arg list
blah = Worker "blah" "default" $ \(word, n) ->
-- Your long-running work goes here
-- N.B. this runs in the Yesod Handler monad, but doesn't have access to
-- anything request- or response- related. Under the hood, it's using
-- `unsafeHandler`, and may error if you try to e.g. redirect. A future
-- version will include a `Handler`-like monad stack which should be
-- safe from these sorts of errors.
replicateM_ n $ do
$(logWarn) word
liftIO . threadDelay $ 1000000
setup = do
register blah
-- register any other jobs you like
-- they need not have the same argument type
Include the Subsite
In Foundation.hs
import Yesod.Worker
data App = App
{ ...
, getWorkers :: Workers
}
instance YesodWorker App where
workers = getWorkers
In Application.hs
import Yesod.Worker
import Jobs
makeFoundation = do
...
getWorkers <- newWorkers
...
makeApplication foundation = do
unsafeHandler foundation $ do
bootWorkers setup
-- optionally, queue jobs on app boot:
enqueue blah ("queued at start", 2)
Queue Up a Job
In e.g. Handlers/Whatever.hs
import Yesod.Worker
import Jobs
postHandlerR = do
enqueue blah ("na", 16)
...
Watch the Stats
Add a route
/workers WorkerR Workers getWorkers
and visit /workers
Over time, this page should expand to a Sidekiq-style administration panel, allowing for closer monitoring and options for retrying from the web UI.
Note that the Redis interface is already Sidekiq compatable, so you can literally use sidekiq/web
for monitoring as well.