Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/02/11 17:56:52 (14 years ago)
Author:
ascheibe
Message:

#1233

  • Executor now sends all exceptions to the ExperimentManager as NetNamedPipe communication won't be possible in a Sandbox due to security constraints
  • count stopped and aborted jobs correctly
  • send correct status when a job is stopped by the ExperimentManager
  • try to log unhandled exceptions to gui if no EventLog is available
  • don't crash if job is sent more than once by server
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs

    r6039 r6100  
    9696          catch (Exception) { }
    9797        } else {
    98           throw ex;
     98          //try to log with clientCom. if this works the user sees at least a message,
     99          //else an exception will be thrown anyways.
     100          clientCom.LogMessage("Error on startup: " + ex.ToString() +
     101            Environment.NewLine + "Core is going to shutdown.");
    99102        }
    100103      }
     
    187190            break;
    188191          case MessageContainer.MessageType.AbortJob:
     192            SlaveStatusInfo.JobsAborted++;
    189193            KillAppDomain(container.JobId);
    190194            break;
     
    222226
    223227          try {
     228            if (engines[job.Id].CurrentException != string.Empty) {
     229              wcfService.UpdateJobState(job.Id, JobState.Failed, engines[job.Id].CurrentException);
     230              SlaveStatusInfo.JobsAborted++;
     231            } else {
     232              SlaveStatusInfo.JobsProcessed++;
     233            }
    224234            clientCom.LogMessage("Sending the paused job with id: " + job.Id);
    225235            wcfService.UpdateJobData(job, sJob, ConfigManager.Instance.GetClientInfo().Id, JobState.Paused);
     
    246256          job.ExecutionTime = engines[job.Id].ExecutionTime;
    247257
     258
    248259          try {
     260            if (engines[job.Id].CurrentException != string.Empty) {
     261              wcfService.UpdateJobState(job.Id, JobState.Failed, engines[job.Id].CurrentException);
     262            }
     263            SlaveStatusInfo.JobsAborted++;
     264
    249265            clientCom.LogMessage("Sending the stoppped job with id: " + job.Id);
    250             wcfService.UpdateJobData(job, sJob, ConfigManager.Instance.GetClientInfo().Id, JobState.Finished);
     266            wcfService.UpdateJobData(job, sJob, ConfigManager.Instance.GetClientInfo().Id, JobState.Aborted);
    251267          }
    252268          catch (Exception e) {
     
    440456
    441457      lock (locker) {
    442         if (engines.ContainsKey(myJob.Id))
    443           throw new Exception("Job with key " + myJob.Id + " already exists");
     458        if (engines.ContainsKey(myJob.Id)) {
     459          clientCom.LogMessage("Job with key " + myJob.Id + " already exists. Job will be ignored.");
     460          return;
     461        }
    444462
    445463        String pluginDir = Path.Combine(PluginCache.Instance.PluginTempBaseDir, myJob.Id.ToString());
     
    476494              engine.Start(jobData.Data);
    477495            }
     496
    478497          }
    479498          catch (Exception exception) {
     
    544563                repeat--;
    545564                if (repeat == 0) {
     565                  clientCom.LogMessage("Could not unload AppDomain, shutting down core...");
    546566                  throw; // rethrow and let app crash
    547567                }
Note: See TracChangeset for help on using the changeset viewer.