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

Bug in documentation #4

Open
salehsed opened this issue Nov 20, 2013 · 5 comments
Open

Bug in documentation #4

salehsed opened this issue Nov 20, 2013 · 5 comments

Comments

@salehsed
Copy link

val failFast = new CircuitExecutor(
name="tweets-breaker",
CircuitConfiguration(
maxFailures = 5,
openCircuitTimeout = 30.seconds,
failureCountTimeout = 1.minute,
maxMethodDuration = 10.seconds)
)
Compile Error :

not enough arguments for constructor CircuitExecutor: (circuitName: String, circuitConfig: com.tzavellas.sse.breaker.CircuitConfiguration, circuitListener: com.tzavellas.sse.breaker.CircuitStateListener)com.tzavellas.sse.breaker.CircuitExecutor

@sptz45
Copy link
Owner

sptz45 commented Nov 20, 2013

I have updated the README with code that compiles.

@salehsed
Copy link
Author

still same

@sptz45
Copy link
Owner

sptz45 commented Nov 21, 2013

Are you using the updated example from the README:

import com.tzavellas.sse.breaker.{CircuitExecutor, CircuitConfiguration}
import scala.concurrent.duration._

val failFast = new CircuitExecutor(
    circuitName="tweets-breaker",
    circuitConfig=CircuitConfiguration(
      maxFailures = 5,
      openCircuitTimeout = 30.seconds,
      failureCountTimeout = 1.minute,
      maxMethodDuration =  10.seconds)
  )

and getting the same compiler error message? I just tried it (again) and it works as expected.

@salehsed
Copy link
Author

yes (copy pasted above code)
not enough arguments for constructor CircuitExecutor: (circuitName: String, circuitConfig: com.tzavellas.sse.breaker.CircuitConfiguration, circuitListener: com.tzavellas.sse.breaker.CircuitStateListener)com.tzavellas.sse.breaker.CircuitExecutor
[error] val failFast = new CircuitExecutor(

@sptz45
Copy link
Owner

sptz45 commented Nov 22, 2013

OK, this is really strange since the last parameter of the CircuitExecutor has a default value. Anyway you can use the below code until I research why this happened.

val failFast = new CircuitExecutor(
    circuitName="tweets-breaker",
    circuitConfig=CircuitConfiguration(
      maxFailures = 5,
      openCircuitTimeout = 30.seconds,
      failureCountTimeout = 1.minute,
      maxMethodDuration =  10.seconds),
    circuitListener = CircuitStateListener.empty
  )

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

2 participants