1 /*
2  *  Make.org Core API
3  *  Copyright (C) 2018 Make.org
4  *
5  * This program is free software: you can redistribute it and/or modify
6  *  it under the terms of the GNU Affero General Public License as
7  *  published by the Free Software Foundation, either version 3 of the
8  *  License, or (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU Affero General Public License for more details.
14  *
15  *  You should have received a copy of the GNU Affero General Public License
16  *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
17  *
18  */
19 
20 package org.make.api.technical.job
21 
22 import cats.implicits._
23 import akka.actor.typed.{ActorRef, Behavior, Scheduler}
24 import akka.actor.typed.scaladsl.AskPattern._
25 import akka.actor.typed.scaladsl.Behaviors
26 import akka.util.Timeout
27 import grizzled.slf4j.Logging
28 import org.make.api.technical.ActorProtocol
29 import org.make.api.technical.job.JobReportingActor.Protocol.{Command, Response}
30 import org.make.core.job.Job.{JobId, Progress}
31 
32 import scala.concurrent.ExecutionContext.Implicits.global
33 import scala.concurrent.Future
34 import scala.concurrent.duration.FiniteDuration
35 import scala.util.{Failure, Success}
36 
37 object JobReportingActor extends Logging {
38 
39   final class JobReportingActorFacade private (actor: ActorRef[Command]) {
40     def apply(progress: Progress)(implicit timeout: Timeout, scheduler: Scheduler): Future[Unit] =
41       (actor ? (Command.Report(progress, _))).void
42   }
43 
44   object JobReportingActorFacade {
45     def apply(actor: ActorRef[Command]): JobReportingActorFacade = new JobReportingActorFacade(actor)
46   }
47 
48   sealed abstract class Protocol extends ActorProtocol
49 
50   object Protocol {
51     sealed abstract class Command extends Protocol
52 
53     object Command {
54       final case class Report(progress: Progress, replyTo: ActorRef[Response.Ack.type]) extends Command
55       final case class Finish(outcome: Option[Throwable]) extends Command
56       case object Tick extends Command
57       case object HeartbeatSuccess extends Command
58       case object HeartbeatFailure extends Command
59       final case class ReportResult(replyTo: ActorRef[Response.Ack.type]) extends Command
60       case object Stop extends Command
61     }
62 
63     sealed abstract class Response extends Protocol
64 
65     object Response {
66       case object Ack extends Response
67     }
68 
69   }
70 
71   def apply(
72     jobId: JobId,
73     work: JobReportingActorFacade => Future[Unit],
74     jobCoordinatorService: JobCoordinatorService,
75     heartRate: FiniteDuration
76   ): Behavior[Protocol.Command] = {
77     Behaviors.setup { context =>
78       Behaviors.withTimers { timers =>
79         timers.startTimerWithFixedDelay(s"${context.self.path.name}-heartbeat", Command.Tick, heartRate)
80 
81         context.pipeToSelf(work(JobReportingActorFacade(context.self))) { result =>
82           Command.Finish(result.failed.toOption)
83         }
84 
85         Behaviors.receiveMessage {
86           case Command.Tick =>
87             val futureResult = jobCoordinatorService.heartbeat(jobId)
88             context.pipeToSelf(futureResult) {
89               case Success(_) => Command.HeartbeatSuccess
90               case Failure(e) =>
91                 logger.error(s"Could not send heartbeat for job $jobId", e)
92                 Command.HeartbeatFailure
93             }
94             Behaviors.same
95           case Command.HeartbeatSuccess => Behaviors.same
96           case Command.HeartbeatFailure => Behaviors.stopped
97           case Command.Report(progress, replyTo) =>
98             val futureResult = jobCoordinatorService.report(jobId, progress)
99             context.pipeToSelf(futureResult) {
100               case Success(_) => Command.ReportResult(replyTo)
101               case Failure(e) =>
102                 logger.error(s"Job $jobId failed to report", e)
103                 Command.ReportResult(replyTo)
104             }
105             Behaviors.same
106           case Command.ReportResult(replyTo) =>
107             replyTo ! Response.Ack
108             Behaviors.same
109           case Command.Finish(outcome) =>
110             val futureResult = jobCoordinatorService.finish(jobId, outcome)
111             context.pipeToSelf(futureResult) {
112               case Success(_) => Command.Stop
113               case Failure(e) =>
114                 logger.error(s"Job $jobId failed to finish", e)
115                 Command.Stop
116             }
117             Behaviors.same
118           case Command.Stop => Behaviors.stopped
119         }
120       }
121     }
122 
123   }
124 }
Line Stmt Id Pos Tree Symbol Tests Code
41 14773 1584 - 1584 ApplyToImplicitArgs cats.instances.FutureInstances.catsStdInstancesForFuture org.make.api.technical.job.jobcoordinatorservicetest cats.implicits.catsStdInstancesForFuture(scala.concurrent.ExecutionContext.Implicits.global)
41 10587 1578 - 1615 ApplyToImplicitArgs akka.actor.typed.scaladsl.AskPattern.Askable.? org.make.api.technical.job.jobcoordinatorservicetest akka.actor.typed.scaladsl.AskPattern.Askable[org.make.api.technical.job.JobReportingActor.Protocol.Command](JobReportingActorFacade.this.actor).?[org.make.api.technical.job.JobReportingActor.Protocol.Response.Ack.type](((x$1: akka.actor.typed.ActorRef[org.make.api.technical.job.JobReportingActor.Protocol.Response.Ack.type]) => org.make.api.technical.job.JobReportingActor.Protocol.Command.Report.apply(progress, x$1)))(timeout, scheduler)
41 10718 1578 - 1621 Select cats.Functor.Ops.void org.make.api.technical.job.jobcoordinatorservicetest cats.implicits.toFunctorOps[scala.concurrent.Future, org.make.api.technical.job.JobReportingActor.Protocol.Response.Ack.type](akka.actor.typed.scaladsl.AskPattern.Askable[org.make.api.technical.job.JobReportingActor.Protocol.Command](JobReportingActorFacade.this.actor).?[org.make.api.technical.job.JobReportingActor.Protocol.Response.Ack.type](((x$1: akka.actor.typed.ActorRef[org.make.api.technical.job.JobReportingActor.Protocol.Response.Ack.type]) => org.make.api.technical.job.JobReportingActor.Protocol.Command.Report.apply(progress, x$1)))(timeout, scheduler))(cats.implicits.catsStdInstancesForFuture(scala.concurrent.ExecutionContext.Implicits.global)).void
41 16517 1584 - 1584 Select scala.concurrent.ExecutionContext.Implicits.global org.make.api.technical.job.jobcoordinatorservicetest scala.concurrent.ExecutionContext.Implicits.global
45 16680 1729 - 1763 Apply org.make.api.technical.job.JobReportingActor.JobReportingActorFacade.<init> new JobReportingActor.this.JobReportingActorFacade(actor)
77 10826 2701 - 4553 Apply akka.actor.typed.scaladsl.Behaviors.setup akka.actor.typed.scaladsl.Behaviors.setup[org.make.api.technical.job.JobReportingActor.Protocol.Command](((context: akka.actor.typed.scaladsl.ActorContext[org.make.api.technical.job.JobReportingActor.Protocol.Command]) => akka.actor.typed.scaladsl.Behaviors.withTimers[org.make.api.technical.job.JobReportingActor.Protocol.Command](((timers: akka.actor.typed.scaladsl.TimerScheduler[org.make.api.technical.job.JobReportingActor.Protocol.Command]) => { timers.startTimerWithFixedDelay(("".+(context.self.path.name).+("-heartbeat"): String), org.make.api.technical.job.JobReportingActor.Protocol.Command.Tick, heartRate); context.pipeToSelf[Unit](work.apply(JobReportingActor.this.JobReportingActorFacade.apply(context.self)))(((result: scala.util.Try[Unit]) => org.make.api.technical.job.JobReportingActor.Protocol.Command.Finish.apply(result.failed.toOption))); akka.actor.typed.scaladsl.Behaviors.receiveMessage[org.make.api.technical.job.JobReportingActor.Protocol.Command](((x0$1: org.make.api.technical.job.JobReportingActor.Protocol.Command) => x0$1 match { case org.make.api.technical.job.JobReportingActor.Protocol.Command.Tick => { val futureResult: scala.concurrent.Future[Unit] = jobCoordinatorService.heartbeat(jobId); context.pipeToSelf[Unit](futureResult)(((x0$2: scala.util.Try[Unit]) => x0$2 match { case (value: Unit): scala.util.Success[Unit](_) => org.make.api.technical.job.JobReportingActor.Protocol.Command.HeartbeatSuccess case (exception: Throwable): scala.util.Failure[Unit]((e @ _)) => { JobReportingActor.this.logger.error(("Could not send heartbeat for job ".+(jobId): String), e); org.make.api.technical.job.JobReportingActor.Protocol.Command.HeartbeatFailure } })); akka.actor.typed.scaladsl.Behaviors.same[org.make.api.technical.job.JobReportingActor.Protocol.Command] } case org.make.api.technical.job.JobReportingActor.Protocol.Command.HeartbeatSuccess => akka.actor.typed.scaladsl.Behaviors.same[org.make.api.technical.job.JobReportingActor.Protocol.Command] case org.make.api.technical.job.JobReportingActor.Protocol.Command.HeartbeatFailure => akka.actor.typed.scaladsl.Behaviors.stopped[org.make.api.technical.job.JobReportingActor.Protocol.Command] case (progress: org.make.core.job.Job.Progress, replyTo: akka.actor.typed.ActorRef[org.make.api.technical.job.JobReportingActor.Protocol.Response.Ack.type]): org.make.api.technical.job.JobReportingActor.Protocol.Command.Report((progress @ _), (replyTo @ _)) => { val futureResult: scala.concurrent.Future[Unit] = jobCoordinatorService.report(jobId, progress); context.pipeToSelf[Unit](futureResult)(((x0$3: scala.util.Try[Unit]) => x0$3 match { case (value: Unit): scala.util.Success[Unit](_) => org.make.api.technical.job.JobReportingActor.Protocol.Command.ReportResult.apply(replyTo) case (exception: Throwable): scala.util.Failure[Unit]((e @ _)) => { JobReportingActor.this.logger.error(("Job ".+(jobId).+(" failed to report"): String), e); org.make.api.technical.job.JobReportingActor.Protocol.Command.ReportResult.apply(replyTo) } })); akka.actor.typed.scaladsl.Behaviors.same[org.make.api.technical.job.JobReportingActor.Protocol.Command] } case (replyTo: akka.actor.typed.ActorRef[org.make.api.technical.job.JobReportingActor.Protocol.Response.Ack.type]): org.make.api.technical.job.JobReportingActor.Protocol.Command.ReportResult((replyTo @ _)) => { typed.this.ActorRef.ActorRefOps[org.make.api.technical.job.JobReportingActor.Protocol.Response.Ack.type](replyTo).!(org.make.api.technical.job.JobReportingActor.Protocol.Response.Ack); akka.actor.typed.scaladsl.Behaviors.same[org.make.api.technical.job.JobReportingActor.Protocol.Command] } case (outcome: Option[Throwable]): org.make.api.technical.job.JobReportingActor.Protocol.Command.Finish((outcome @ _)) => { val futureResult: scala.concurrent.Future[Unit] = jobCoordinatorService.finish(jobId, outcome); context.pipeToSelf[Unit](futureResult)(((x0$4: scala.util.Try[Unit]) => x0$4 match { case (value: Unit): scala.util.Success[Unit](_) => org.make.api.technical.job.JobReportingActor.Protocol.Command.Stop case (exception: Throwable): scala.util.Failure[Unit]((e @ _)) => { JobReportingActor.this.logger.error(("Job ".+(jobId).+(" failed to finish"): String), e); org.make.api.technical.job.JobReportingActor.Protocol.Command.Stop } })); akka.actor.typed.scaladsl.Behaviors.same[org.make.api.technical.job.JobReportingActor.Protocol.Command] } case org.make.api.technical.job.JobReportingActor.Protocol.Command.Stop => akka.actor.typed.scaladsl.Behaviors.stopped[org.make.api.technical.job.JobReportingActor.Protocol.Command] })) }))))
78 12954 2736 - 4547 Apply akka.actor.typed.scaladsl.Behaviors.withTimers akka.actor.typed.scaladsl.Behaviors.withTimers[org.make.api.technical.job.JobReportingActor.Protocol.Command](((timers: akka.actor.typed.scaladsl.TimerScheduler[org.make.api.technical.job.JobReportingActor.Protocol.Command]) => { timers.startTimerWithFixedDelay(("".+(context.self.path.name).+("-heartbeat"): String), org.make.api.technical.job.JobReportingActor.Protocol.Command.Tick, heartRate); context.pipeToSelf[Unit](work.apply(JobReportingActor.this.JobReportingActorFacade.apply(context.self)))(((result: scala.util.Try[Unit]) => org.make.api.technical.job.JobReportingActor.Protocol.Command.Finish.apply(result.failed.toOption))); akka.actor.typed.scaladsl.Behaviors.receiveMessage[org.make.api.technical.job.JobReportingActor.Protocol.Command](((x0$1: org.make.api.technical.job.JobReportingActor.Protocol.Command) => x0$1 match { case org.make.api.technical.job.JobReportingActor.Protocol.Command.Tick => { val futureResult: scala.concurrent.Future[Unit] = jobCoordinatorService.heartbeat(jobId); context.pipeToSelf[Unit](futureResult)(((x0$2: scala.util.Try[Unit]) => x0$2 match { case (value: Unit): scala.util.Success[Unit](_) => org.make.api.technical.job.JobReportingActor.Protocol.Command.HeartbeatSuccess case (exception: Throwable): scala.util.Failure[Unit]((e @ _)) => { JobReportingActor.this.logger.error(("Could not send heartbeat for job ".+(jobId): String), e); org.make.api.technical.job.JobReportingActor.Protocol.Command.HeartbeatFailure } })); akka.actor.typed.scaladsl.Behaviors.same[org.make.api.technical.job.JobReportingActor.Protocol.Command] } case org.make.api.technical.job.JobReportingActor.Protocol.Command.HeartbeatSuccess => akka.actor.typed.scaladsl.Behaviors.same[org.make.api.technical.job.JobReportingActor.Protocol.Command] case org.make.api.technical.job.JobReportingActor.Protocol.Command.HeartbeatFailure => akka.actor.typed.scaladsl.Behaviors.stopped[org.make.api.technical.job.JobReportingActor.Protocol.Command] case (progress: org.make.core.job.Job.Progress, replyTo: akka.actor.typed.ActorRef[org.make.api.technical.job.JobReportingActor.Protocol.Response.Ack.type]): org.make.api.technical.job.JobReportingActor.Protocol.Command.Report((progress @ _), (replyTo @ _)) => { val futureResult: scala.concurrent.Future[Unit] = jobCoordinatorService.report(jobId, progress); context.pipeToSelf[Unit](futureResult)(((x0$3: scala.util.Try[Unit]) => x0$3 match { case (value: Unit): scala.util.Success[Unit](_) => org.make.api.technical.job.JobReportingActor.Protocol.Command.ReportResult.apply(replyTo) case (exception: Throwable): scala.util.Failure[Unit]((e @ _)) => { JobReportingActor.this.logger.error(("Job ".+(jobId).+(" failed to report"): String), e); org.make.api.technical.job.JobReportingActor.Protocol.Command.ReportResult.apply(replyTo) } })); akka.actor.typed.scaladsl.Behaviors.same[org.make.api.technical.job.JobReportingActor.Protocol.Command] } case (replyTo: akka.actor.typed.ActorRef[org.make.api.technical.job.JobReportingActor.Protocol.Response.Ack.type]): org.make.api.technical.job.JobReportingActor.Protocol.Command.ReportResult((replyTo @ _)) => { typed.this.ActorRef.ActorRefOps[org.make.api.technical.job.JobReportingActor.Protocol.Response.Ack.type](replyTo).!(org.make.api.technical.job.JobReportingActor.Protocol.Response.Ack); akka.actor.typed.scaladsl.Behaviors.same[org.make.api.technical.job.JobReportingActor.Protocol.Command] } case (outcome: Option[Throwable]): org.make.api.technical.job.JobReportingActor.Protocol.Command.Finish((outcome @ _)) => { val futureResult: scala.concurrent.Future[Unit] = jobCoordinatorService.finish(jobId, outcome); context.pipeToSelf[Unit](futureResult)(((x0$4: scala.util.Try[Unit]) => x0$4 match { case (value: Unit): scala.util.Success[Unit](_) => org.make.api.technical.job.JobReportingActor.Protocol.Command.Stop case (exception: Throwable): scala.util.Failure[Unit]((e @ _)) => { JobReportingActor.this.logger.error(("Job ".+(jobId).+(" failed to finish"): String), e); org.make.api.technical.job.JobReportingActor.Protocol.Command.Stop } })); akka.actor.typed.scaladsl.Behaviors.same[org.make.api.technical.job.JobReportingActor.Protocol.Command] } case org.make.api.technical.job.JobReportingActor.Protocol.Command.Stop => akka.actor.typed.scaladsl.Behaviors.stopped[org.make.api.technical.job.JobReportingActor.Protocol.Command] })) }))
79 9497 2777 - 2873 Apply akka.actor.typed.scaladsl.TimerScheduler.startTimerWithFixedDelay timers.startTimerWithFixedDelay(("".+(context.self.path.name).+("-heartbeat"): String), org.make.api.technical.job.JobReportingActor.Protocol.Command.Tick, heartRate)
79 13576 2849 - 2861 Select org.make.api.technical.job.JobReportingActor.Protocol.Command.Tick org.make.api.technical.job.JobReportingActor.Protocol.Command.Tick
81 13723 2907 - 2944 Apply org.make.api.technical.job.JobReportingActor.JobReportingActorFacade.apply JobReportingActor.this.JobReportingActorFacade.apply(context.self)
81 17466 2931 - 2943 Select akka.actor.typed.scaladsl.ActorContext.self context.self
81 10901 2883 - 3017 Apply akka.actor.typed.scaladsl.ActorContext.pipeToSelf context.pipeToSelf[Unit](work.apply(JobReportingActor.this.JobReportingActorFacade.apply(context.self)))(((result: scala.util.Try[Unit]) => org.make.api.technical.job.JobReportingActor.Protocol.Command.Finish.apply(result.failed.toOption)))
81 10497 2902 - 2945 Apply scala.Function1.apply work.apply(JobReportingActor.this.JobReportingActorFacade.apply(context.self))
82 14542 2969 - 3007 Apply org.make.api.technical.job.JobReportingActor.Protocol.Command.Finish.apply org.make.api.technical.job.JobReportingActor.Protocol.Command.Finish.apply(result.failed.toOption)
82 16538 2984 - 3006 Select scala.util.Try.toOption result.failed.toOption
85 16530 3027 - 4539 Apply akka.actor.typed.scaladsl.Behaviors.receiveMessage akka.actor.typed.scaladsl.Behaviors.receiveMessage[org.make.api.technical.job.JobReportingActor.Protocol.Command](((x0$1: org.make.api.technical.job.JobReportingActor.Protocol.Command) => x0$1 match { case org.make.api.technical.job.JobReportingActor.Protocol.Command.Tick => { val futureResult: scala.concurrent.Future[Unit] = jobCoordinatorService.heartbeat(jobId); context.pipeToSelf[Unit](futureResult)(((x0$2: scala.util.Try[Unit]) => x0$2 match { case (value: Unit): scala.util.Success[Unit](_) => org.make.api.technical.job.JobReportingActor.Protocol.Command.HeartbeatSuccess case (exception: Throwable): scala.util.Failure[Unit]((e @ _)) => { JobReportingActor.this.logger.error(("Could not send heartbeat for job ".+(jobId): String), e); org.make.api.technical.job.JobReportingActor.Protocol.Command.HeartbeatFailure } })); akka.actor.typed.scaladsl.Behaviors.same[org.make.api.technical.job.JobReportingActor.Protocol.Command] } case org.make.api.technical.job.JobReportingActor.Protocol.Command.HeartbeatSuccess => akka.actor.typed.scaladsl.Behaviors.same[org.make.api.technical.job.JobReportingActor.Protocol.Command] case org.make.api.technical.job.JobReportingActor.Protocol.Command.HeartbeatFailure => akka.actor.typed.scaladsl.Behaviors.stopped[org.make.api.technical.job.JobReportingActor.Protocol.Command] case (progress: org.make.core.job.Job.Progress, replyTo: akka.actor.typed.ActorRef[org.make.api.technical.job.JobReportingActor.Protocol.Response.Ack.type]): org.make.api.technical.job.JobReportingActor.Protocol.Command.Report((progress @ _), (replyTo @ _)) => { val futureResult: scala.concurrent.Future[Unit] = jobCoordinatorService.report(jobId, progress); context.pipeToSelf[Unit](futureResult)(((x0$3: scala.util.Try[Unit]) => x0$3 match { case (value: Unit): scala.util.Success[Unit](_) => org.make.api.technical.job.JobReportingActor.Protocol.Command.ReportResult.apply(replyTo) case (exception: Throwable): scala.util.Failure[Unit]((e @ _)) => { JobReportingActor.this.logger.error(("Job ".+(jobId).+(" failed to report"): String), e); org.make.api.technical.job.JobReportingActor.Protocol.Command.ReportResult.apply(replyTo) } })); akka.actor.typed.scaladsl.Behaviors.same[org.make.api.technical.job.JobReportingActor.Protocol.Command] } case (replyTo: akka.actor.typed.ActorRef[org.make.api.technical.job.JobReportingActor.Protocol.Response.Ack.type]): org.make.api.technical.job.JobReportingActor.Protocol.Command.ReportResult((replyTo @ _)) => { typed.this.ActorRef.ActorRefOps[org.make.api.technical.job.JobReportingActor.Protocol.Response.Ack.type](replyTo).!(org.make.api.technical.job.JobReportingActor.Protocol.Response.Ack); akka.actor.typed.scaladsl.Behaviors.same[org.make.api.technical.job.JobReportingActor.Protocol.Command] } case (outcome: Option[Throwable]): org.make.api.technical.job.JobReportingActor.Protocol.Command.Finish((outcome @ _)) => { val futureResult: scala.concurrent.Future[Unit] = jobCoordinatorService.finish(jobId, outcome); context.pipeToSelf[Unit](futureResult)(((x0$4: scala.util.Try[Unit]) => x0$4 match { case (value: Unit): scala.util.Success[Unit](_) => org.make.api.technical.job.JobReportingActor.Protocol.Command.Stop case (exception: Throwable): scala.util.Failure[Unit]((e @ _)) => { JobReportingActor.this.logger.error(("Job ".+(jobId).+(" failed to finish"): String), e); org.make.api.technical.job.JobReportingActor.Protocol.Command.Stop } })); akka.actor.typed.scaladsl.Behaviors.same[org.make.api.technical.job.JobReportingActor.Protocol.Command] } case org.make.api.technical.job.JobReportingActor.Protocol.Command.Stop => akka.actor.typed.scaladsl.Behaviors.stopped[org.make.api.technical.job.JobReportingActor.Protocol.Command] }))
87 16762 3116 - 3154 Apply org.make.api.technical.job.JobCoordinatorService.heartbeat jobCoordinatorService.heartbeat(jobId)
88 13916 3167 - 3423 Apply akka.actor.typed.scaladsl.ActorContext.pipeToSelf context.pipeToSelf[Unit](futureResult)(((x0$2: scala.util.Try[Unit]) => x0$2 match { case (value: Unit): scala.util.Success[Unit](_) => org.make.api.technical.job.JobReportingActor.Protocol.Command.HeartbeatSuccess case (exception: Throwable): scala.util.Failure[Unit]((e @ _)) => { JobReportingActor.this.logger.error(("Could not send heartbeat for job ".+(jobId): String), e); org.make.api.technical.job.JobReportingActor.Protocol.Command.HeartbeatFailure } }))
89 13594 3235 - 3259 Select org.make.api.technical.job.JobReportingActor.Protocol.Command.HeartbeatSuccess org.make.api.technical.job.JobReportingActor.Protocol.Command.HeartbeatSuccess
91 9975 3309 - 3368 Apply grizzled.slf4j.Logger.error JobReportingActor.this.logger.error(("Could not send heartbeat for job ".+(jobId): String), e)
92 17483 3385 - 3409 Select org.make.api.technical.job.JobReportingActor.Protocol.Command.HeartbeatFailure org.make.api.technical.job.JobReportingActor.Protocol.Command.HeartbeatFailure
94 10211 3436 - 3450 TypeApply akka.actor.typed.scaladsl.Behaviors.same akka.actor.typed.scaladsl.Behaviors.same[org.make.api.technical.job.JobReportingActor.Protocol.Command]
95 16556 3494 - 3508 TypeApply akka.actor.typed.scaladsl.Behaviors.same akka.actor.typed.scaladsl.Behaviors.same[org.make.api.technical.job.JobReportingActor.Protocol.Command]
96 14442 3552 - 3569 TypeApply akka.actor.typed.scaladsl.Behaviors.stopped akka.actor.typed.scaladsl.Behaviors.stopped[org.make.api.technical.job.JobReportingActor.Protocol.Command]
98 10919 3653 - 3698 Apply org.make.api.technical.job.JobCoordinatorService.report jobCoordinatorService.report(jobId, progress)
99 17380 3711 - 3965 Apply akka.actor.typed.scaladsl.ActorContext.pipeToSelf context.pipeToSelf[Unit](futureResult)(((x0$3: scala.util.Try[Unit]) => x0$3 match { case (value: Unit): scala.util.Success[Unit](_) => org.make.api.technical.job.JobReportingActor.Protocol.Command.ReportResult.apply(replyTo) case (exception: Throwable): scala.util.Failure[Unit]((e @ _)) => { JobReportingActor.this.logger.error(("Job ".+(jobId).+(" failed to report"): String), e); org.make.api.technical.job.JobReportingActor.Protocol.Command.ReportResult.apply(replyTo) } }))
100 16660 3779 - 3808 Apply org.make.api.technical.job.JobReportingActor.Protocol.Command.ReportResult.apply org.make.api.technical.job.JobReportingActor.Protocol.Command.ReportResult.apply(replyTo)
102 13223 3858 - 3905 Apply grizzled.slf4j.Logger.error JobReportingActor.this.logger.error(("Job ".+(jobId).+(" failed to report"): String), e)
103 9743 3922 - 3951 Apply org.make.api.technical.job.JobReportingActor.Protocol.Command.ReportResult.apply org.make.api.technical.job.JobReportingActor.Protocol.Command.ReportResult.apply(replyTo)
105 13707 3978 - 3992 TypeApply akka.actor.typed.scaladsl.Behaviors.same akka.actor.typed.scaladsl.Behaviors.same[org.make.api.technical.job.JobReportingActor.Protocol.Command]
107 10229 4063 - 4075 Select org.make.api.technical.job.JobReportingActor.Protocol.Response.Ack org.make.api.technical.job.JobReportingActor.Protocol.Response.Ack
107 16198 4053 - 4075 Apply akka.actor.typed.ActorRef.ActorRefOps.! typed.this.ActorRef.ActorRefOps[org.make.api.technical.job.JobReportingActor.Protocol.Response.Ack.type](replyTo).!(org.make.api.technical.job.JobReportingActor.Protocol.Response.Ack)
108 12734 4088 - 4102 TypeApply akka.actor.typed.scaladsl.Behaviors.same akka.actor.typed.scaladsl.Behaviors.same[org.make.api.technical.job.JobReportingActor.Protocol.Command]
110 10810 4176 - 4220 Apply org.make.api.technical.job.JobCoordinatorService.finish jobCoordinatorService.finish(jobId, outcome)
111 17393 4233 - 4453 Apply akka.actor.typed.scaladsl.ActorContext.pipeToSelf context.pipeToSelf[Unit](futureResult)(((x0$4: scala.util.Try[Unit]) => x0$4 match { case (value: Unit): scala.util.Success[Unit](_) => org.make.api.technical.job.JobReportingActor.Protocol.Command.Stop case (exception: Throwable): scala.util.Failure[Unit]((e @ _)) => { JobReportingActor.this.logger.error(("Job ".+(jobId).+(" failed to finish"): String), e); org.make.api.technical.job.JobReportingActor.Protocol.Command.Stop } }))
112 16675 4301 - 4313 Select org.make.api.technical.job.JobReportingActor.Protocol.Command.Stop org.make.api.technical.job.JobReportingActor.Protocol.Command.Stop
114 13239 4363 - 4410 Apply grizzled.slf4j.Logger.error JobReportingActor.this.logger.error(("Job ".+(jobId).+(" failed to finish"): String), e)
115 9950 4427 - 4439 Select org.make.api.technical.job.JobReportingActor.Protocol.Command.Stop org.make.api.technical.job.JobReportingActor.Protocol.Command.Stop
117 13719 4466 - 4480 TypeApply akka.actor.typed.scaladsl.Behaviors.same akka.actor.typed.scaladsl.Behaviors.same[org.make.api.technical.job.JobReportingActor.Protocol.Command]
118 10107 4512 - 4529 TypeApply akka.actor.typed.scaladsl.Behaviors.stopped akka.actor.typed.scaladsl.Behaviors.stopped[org.make.api.technical.job.JobReportingActor.Protocol.Command]