Git Product home page Git Product logo

Comments (5)

sptz45 avatar sptz45 commented on August 19, 2024

I have updated the README with code that compiles.

from sse-breaker.

salehsed avatar salehsed commented on August 19, 2024

still same

from sse-breaker.

sptz45 avatar sptz45 commented on August 19, 2024

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.

from sse-breaker.

salehsed avatar salehsed commented on August 19, 2024

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(

from sse-breaker.

sptz45 avatar sptz45 commented on August 19, 2024

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
  )

from sse-breaker.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.