+
Skip to content

alexkuang/again

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Again

hex package hex docs ci

A library for retrying work again... and again... and again...

Installation

def deps do
  [
    {:again, "~> 0.1.0"}
  ]
end

Usage

# Create a retry policy
alias Again.{Backoff, Clock, SystemClock, Termination}

policy =
  %Again.Policy{
    clock: SystemClock,
    backoff: Backoff.exponential_backoff(100),
    termination: Termination.limit_attempts(5)
  }

# Use it
Again.retry(policy, fn ->
  do_something_that_might_fail()
end)

TODO

A couple of things before this library is ready for primetime:

  • Better classification for error + success results
  • Observability into execution state / Logger integration
  • More docs + ergonomics

Documentation

Latest HexDocs

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载