Module Sihl_queue_core.JobSource
Sourcetype 'a t = {name : string;input_to_string : 'a -> string option;string_to_input : string option -> ('a, string) Result.t;handle : input:'a -> (unit, string) Result.t Lwt.t;failed : unit -> (unit, string) Result.t Lwt.t;max_tries : int;retry_delay : Sihl_utils.Time.duration;
} Sourceval create :
name:string ->
input_to_string:('a -> string option) ->
string_to_input:(string option -> ('a, string) Result.t) ->
handle:(input:'a -> (unit, string) Result.t Lwt.t) ->
?failed:(unit -> (unit, string) Lwt_result.t) ->
unit ->
'a t Sourceval set_max_tries : int -> 'a t -> 'a t