Skip to content

Memory leak bug fix #79

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

Merged
merged 3 commits into from
Jan 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ object services {

import EvalResponse.messages._

def evaluatorInstance[F[_]: ConcurrentEffect: ContextShift: Timer: Sync] =
new Evaluator[F](20 seconds)

val corsHeaders = Seq(
Header("Vary", "Origin,Access-Control-Request-Methods"),
Header("Access-Control-Allow-Methods", "POST"),
Expand Down Expand Up @@ -116,12 +113,14 @@ object EvaluatorServer extends IOApp {
lazy val port = (Option(System.getenv("PORT")) orElse
Option(System.getProperty("http.port"))).map(_.toInt).getOrElse(8080)

lazy val evaluator = new Evaluator[IO](15 seconds)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, why did we change from 20 seconds to 15 seconds?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, should be 20? Or 15 secs is fine?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

15 should be fine, but ideally, this should be on the application.conf file


override def run(args: List[String]): IO[ExitCode] = {
logger.info(s"Initializing Evaluator at $ip:$port")

BlazeServerBuilder[IO]
.bindHttp(port, ip)
.withHttpApp(auth[IO](service(evaluatorInstance)))
.withHttpApp(auth[IO](service(evaluator)))
.serve
.compile
.lastOrError
Expand Down