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. work : input:string option -> (unit, string) Result.t Lwt.t;
  3. failed : unit -> (unit, string) Result.t Lwt.t;
  4. max_tries : int;
  5. retry_delay : Sihl_utils.Time.duration;
}
val pp : Ppx_deriving_runtime.Format.formatter -> t -> Ppx_deriving_runtime.unit
val retry_delay : t -> Sihl_utils.Time.duration
val max_tries : t -> int
val failed : t -> unit -> (unit, string) Result.t Lwt.t
val work : t -> input:string option -> (unit, string) Result.t Lwt.t
val name : t -> string
module Fields : sig ... end
val of_job : 'a Sihl_queue_core__.Model.Job.t -> t