Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide usage examples #8

Open
Matzz opened this issue Nov 6, 2014 · 5 comments
Open

Provide usage examples #8

Matzz opened this issue Nov 6, 2014 · 5 comments

Comments

@Matzz
Copy link

Matzz commented Nov 6, 2014

This library looks great. Unfortunately lack of full examples is makes working with it quite difficult. Uncomplete code faragments are not helpfull.
For example:

import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future

retry.Backoff()(Future {
  // something that can "fail"
})

produce

Multiple markers at this line
    - type mismatch; found : scala.concurrent.Future[Int] required: 
     odelay.Timer
    - type mismatch; found : scala.concurrent.Future[Unit] required: 
     odelay.Timer

or

val future = retry.Directly(4) {
  attempt
}

Leads to type mismatch; found : X required: () => scala.concurrent.Future[?]

Could you provide some simple but full examples of usage? With:

  • definition (or import) of Success,
  • some dummy operation in retry
  • performing some operation when result is complete (or failed)
    ?
@softprops
Copy link
Contributor

thanks for the feedback @Matzz I'll try and clean up the readme. In the meantime you can checkout the test dir for some examples https://github.com/softprops/retry/tree/master/src/test/scala

@Matzz
Copy link
Author

Matzz commented Nov 6, 2014

Tests are very helpful. Thank you.

@a-nigredo
Copy link

Hi, @softprops link to tests return 404

@adamw
Copy link
Member

adamw commented Mar 20, 2018

@zbigniev
Copy link

Seems to have changed again to https://github.com/softwaremill/retry/tree/master/retry/src/test/scala

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants