package sihl

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

A workable job can process a job instance that is persisted. We can not store the job directly because of the polymorphic type ('a Job.t).

type t = {
  1. name : string;
  2. with_context : Sihl_core.Ctx.t -> Sihl_core.Ctx.t;
  3. work : Sihl_core.Ctx.t -> input:string option -> (unit, string) Result.t Lwt.t;
  4. failed : Sihl_core.Ctx.t -> (unit, string) Result.t Lwt.t;
  5. max_tries : int;
  6. retry_delay : Sihl_utils.Time.duration;
}
val retry_delay : t -> Sihl_utils.Time.duration
val max_tries : t -> int
val failed : t -> Sihl_core.Ctx.t -> (unit, string) Result.t Lwt.t
val work : t -> Sihl_core.Ctx.t -> input:string option -> (unit, string) Result.t Lwt.t
val with_context : t -> Sihl_core.Ctx.t -> Sihl_core.Ctx.t
val name : t -> string
module Fields : sig ... end
val of_job : 'a Sihl_queue_core__.Model.Job.t -> t
OCaml

Innovation. Community. Security.