Kitto v0.9.1 Kitto.BackoffServer View Source

Module responsible for keeping and applying a backoff value for a given atom.

Configuration

  • :job_min_backoff - The minimum time in milliseconds to backoff upon failure
  • :job_max_backoff - The maximum time in milliseconds to backoff upon failure

Link to this section Summary

Functions

Makes the calling process sleep for the accumulated backoff time for the given atom

Returns a specification to start this module under a supervisor

Increments the backoff value for the provided atom up to the configured maximum value

Resets the backoff for the given atom to 0

Link to this section Functions

Link to this function backoff!(name) View Source
backoff!(atom) :: :nop | :ok

Makes the calling process sleep for the accumulated backoff time for the given atom

Returns a specification to start this module under a supervisor.

See Supervisor.

Increments the backoff value for the provided atom up to the configured maximum value.

Link to this function get(name) View Source
get(atom) :: nil | non_neg_integer
Link to this function succeed(name) View Source
succeed(atom) :: atom

Resets the backoff for the given atom to 0