To focus the search input from anywhere on the page, press the 'S' key.
in-package search v0.1.0
The MariaDB queue backend supports fully persistent queues and locking.
val router : ?back:string -> ?theme:[ `Custom of string | `Light | `Dark ] -> string -> Sihl.Web.router
router ?back scope returns a router that can be passed to the web server to serve the job queue dashboard.
back is an optional URL which renders a back button on the dashboard. Use this to provide your admin user a way to easily exit the dashboard. By default, no URL is provided and no back button is shown.
scope is the URL path under which the dashboard can be accessed. It is common to have some admin UI under
/admin, the job queue dashboard could be available under
You can use HTMX by setting
val dispatch : ?ctx:(string * string) list -> ?delay:Ptime.span -> 'a -> 'a Sihl__.Contract_queue.job -> unit Lwt.t
dispatch ?ctx ?delay input job queues
job for later processing and returns
unit Lwt.t once the job has been queued.
delay determines the amount of time from now (when dispatch is called) up until the job can be run. If no delay is specified, the job is processed as soon as possible.
input is the input of the
handle function which is used for job processing.
val dispatch_all : ?ctx:(string * string) list -> ?delay:Ptime.span -> 'a list -> 'a Sihl__.Contract_queue.job -> unit Lwt.t
dispatch_all ?ctx ?delay inputs jobs queues all
jobs for later processing and returns
unit Lwt.t once all the jobs has been queued. The jobs are put onto the queue in reverse order. The first job in the list of
jobs is put onto the queue last, which means it gets processed first.
If the queue backend supports transactions,
dispatch_all guarantees that either none or all jobs are queued.
delay determines the amount of time from now (when dispatch is called) up until the jobs can be run. If no delay is specified, the jobs are processed as soon as possible.
inputs is the input of the
handle function. It is a list of
'a, one for each
'a job instance.
val register_jobs : Sihl__.Contract_queue.job' list -> unit Lwt.t
register_jobs jobs registers jobs that can be dispatched later on.
Only registered jobs can be dispatched. Dispatching a job that was not registered does nothing.