Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/08/11 18:53:41 (13 years ago)
Author:
ascheibe
Message:

#1672 fixed starting, pausing and stopping of jobs and tasks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveClient.cs

    r7144 r7156  
    236236        }
    237237      });
    238       // execution state does not need to be set. it will be set to Stopped, when all jobs have been downloaded
     238      refreshableJob.ExecutionState = ExecutionState.Stopped;
     239    }
     240
     241    public static void ResumeJob(RefreshableJob refreshableJob) {
     242      HiveServiceLocator.Instance.CallHiveService(service => {
     243        foreach (HiveTask task in refreshableJob.GetAllHiveTasks()) {
     244          if (task.Task.State == TaskState.Paused) {           
     245            service.RestartTask(task.Task.Id);           
     246          }
     247        }
     248      });
     249      refreshableJob.ExecutionState = ExecutionState.Started;
    239250    }
    240251
Note: See TracChangeset for help on using the changeset viewer.