Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
val to_sexp : 'a Sihl_contract.Queue.t -> Sexplib0.Sexp.t
val pp : Format.formatter -> 'a Sihl_contract.Queue.t -> unit
val default_retry_delay : Sihl_core.Time.duration
val create :
name:string ->
input_to_string:('a -> string option) ->
string_to_input:(string option -> ('a, string) result) ->
handle:('a -> (unit, string) result Lwt.t) ->
?failed:(string -> (unit, string) Lwt_result.t) ->
unit ->
'a Sihl_contract.Queue.t
val set_max_tries : int -> 'a Sihl_contract.Queue.t -> 'a Sihl_contract.Queue.t
val set_retry_delay :
Sihl_core.Time.duration ->
'a Sihl_contract.Queue.t ->
'a Sihl_contract.Queue.t
include Sihl_contract.Queue.Sig
include Sihl_core.Container.Service.Sig
val dispatch :
'a Sihl_contract.Queue.t ->
?delay:Sihl_core.Time.duration ->
'a ->
unit Lwt.t
dispatch job ?delay input
queues job
for processing while input input
is the input that the job needs to run. Use delay
to run the job earliest after a certain amount of time.
val register_jobs : 'a Sihl_contract.Queue.t list -> unit Lwt.t
register_jobs jobs
registers jobs that can be dispatched.
Only registered jobs can be dispatched. Dispatching a job that was not registered does nothing.
val lifecycle : unit -> Sihl_core.Container.Lifecycle.t
val register :
?jobs:'a Sihl_contract.Queue.t list ->
(module Sihl_contract.Queue.Sig) ->
Sihl_core.Container.Service.t