Functional utilities, LRU cache, and retry helpers matching kombu.utils.functional
and kombu.utils.time.
Summary
Functions
Remove all keys from a map or keyword list whose value is nil.
Generate floating-point range (kombu.utils.functional.fxrange).
Generate floating-point range bounded by cumulative sum max (kombu.utils.functional.fxrangemax).
Wrap a scalar in a single-element list unless it is nil or already a list.
Convert seconds to milliseconds (int(float(v) * 1000.0)), or nil if nil.
Retry fun when an exception in catch_list is raised (kombu.utils.functional.retry_over_time).
Functions
Remove all keys from a map or keyword list whose value is nil.
@spec fxrange(number(), number() | nil, number(), boolean()) :: Enumerable.t()
Generate floating-point range (kombu.utils.functional.fxrange).
@spec fxrangemax(number(), number() | nil, number(), number()) :: Enumerable.t()
Generate floating-point range bounded by cumulative sum max (kombu.utils.functional.fxrangemax).
Wrap a scalar in a single-element list unless it is nil or already a list.
Convert seconds to milliseconds (int(float(v) * 1000.0)), or nil if nil.
Retry fun when an exception in catch_list is raised (kombu.utils.functional.retry_over_time).
Options:
:max_retries- maximum number of retries before re-raising (nilfor unlimited):interval_start- initial backoff in seconds (default2):interval_step- backoff increment in seconds (default2):interval_max- maximum sleep interval in seconds (default30):errback-fn exc, interval_list, retries -> sleep_seconds:callback-fn -> :okcalled between retries and each 1s sleep tick:timeout- overall timeout in seconds (nilfor none):sleep_fn- custom sleep functionfn seconds -> :ok(defaults toProcess.sleep(trunc(s * 1000)))