ElasticsearchElixirBulkProcessor.Bulk.Retry (Elasticsearch Elixir Bulk Processor v0.1.7)

Link to this section Summary

Functions

Reads the application variable retry_function and uses as the result as the retyr policy.

Link to this section Functions

Reads the application variable retry_function and uses as the result as the retyr policy.

ElixirRetry is used for retrying. The default policy is:

constant_backoff(100) |> Stream.take(5)

Examples

iex> use Retry ...> Application.put_env(:elasticsearch_elixir_bulk_processor, :retry_function, fn -> ...> constant_backoff(100) |> Stream.take(2) ...> end) ...> ElasticsearchElixirBulkProcessor.Bulk.Retry.policy() |> Enum.to_list() 'dd'

iex> use Retry ...> Application.put_env(:elasticsearch_elixir_bulk_processor, :retry_function, nil) ...> ElasticsearchElixirBulkProcessor.Bulk.Retry.policy() |> Enum.to_list() 'ddddd'