/// <summary> /// Handle the message "JobFailedMessage" received from Worker /// </summary> /// <param name="job">message</param> private void HandleJobFailed(JobFailedMessage job) { ColorConsole.WriteLineMagenta("Task {0} of Coordinator {1} failed.", job.ID, Self.Path.Name); // send response to parent - commander _parent.Tell(job); // move to next state BecomeWaiting(); }
/// <summary> /// Handle the message "JobFailedMessage" received from Worker /// </summary> /// <param name="job">message</param> private void HandleJobFailed(JobFailedMessage job) { // send response to commander Context.ActorSelection(ActorPaths.CommanderActor.Path).Tell(job); _logger.Info("Cordinator {0} received JobFailedMessage from {1} for Task ID: {2}", Self.Path.Name, Sender.Path.Name, job.ID); // ColorConsole.WriteLineMagenta("Task {0} of Coordinator {1} failed.", job.ID, Self.Path.Name); // move to next state BecomeWaiting(); }
/// <summary> /// Handle the message "JobFailedMessage" received from Worker /// </summary> /// <param name="job">message</param> private void HandleJobFailed(JobFailedMessage job) { ColorConsole.WriteLineMagenta("Task {0} of Coordinator {1} failed.", job.ID, Self.Path.Name); // send response to parent - commander _parent.Tell(job); // move to next state BecomeWaiting(); if (job.Status == JobStatus.Timeout) { //Context.Stop(_taskWorker); var shutdown = _taskWorker.GracefulStop(TimeSpan.FromMilliseconds(5)); InitializeWorker("worker_" + job.ID.ToString() + "_" + job.TimeOut.ToString()); } }
private void HandleJobFailed(JobFailedMessage job) { _failedJobs.Add(job); ColorConsole.WriteLineRed("Task {0}. {1} failed ", job.ID, job.Description); Self.Tell(new UpdateJobStatastics()); }