Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/09/11 14:12:10 (13 years ago)
Author:
cneumuel
Message:

#1233

  • removed Job-dto objects from slave core (since it stores outdated objects)
  • added command textbox to HiveJobView
  • improved the way the control buttons behave in HiveJobView
  • improved job control (pause and stop is also possible when job is not currently calculating)
  • improved gantt chart view (last state log entry is also displayed)
  • unified code for downloading jobs between experiment manager and hive engine
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveService.cs

    r6110 r6168  
    171171    public void StopJob(Guid jobId) {
    172172      trans.UseTransaction(() => {
    173         //dao.UpdateJobState(jobId, JobState.Aborted, null, auth.UserId, string.Empty);
    174173        var job = dao.GetJob(jobId);
    175         job.Command = Command.Stop;
    176         dao.UpdateJob(job);
     174        if (job.State == JobState.Calculating || job.State == JobState.Transferring) {
     175          job.Command = Command.Stop;
     176          dao.UpdateJob(job);
     177        } else {
     178          if (job.State != JobState.Aborted && job.State != JobState.Finished && job.State != JobState.Failed) {
     179            job = UpdateJobState(jobId, JobState.Aborted, null, null, string.Empty);
     180          }
     181        }
    177182      });
    178183    }
     
    183188    public void PauseJob(Guid jobId) {
    184189      trans.UseTransaction(() => {
    185         //dao.UpdateJobState(jobId, JobState.Paused, null, auth.UserId, string.Empty);
    186190        var job = dao.GetJob(jobId);
    187         job.Command = Command.Pause;
    188         dao.UpdateJob(job);
     191        if (job.State == JobState.Calculating || job.State == JobState.Transferring) {
     192          job.Command = Command.Pause;
     193          dao.UpdateJob(job);
     194        } else {
     195          job = UpdateJobState(jobId, JobState.Paused, null, null, string.Empty);
     196        }
    189197      });
    190198    }
Note: See TracChangeset for help on using the changeset viewer.