예제 #1
0
 /// <summary>
 /// Cancel a job in the benchmarksystem
 /// </summary>
 /// <param name="job">The job to cancel</param>
 public void Cancel(Job job)
 {
     //Notify subscribers
     if (JobCancelled != null)
     {
         JobCancelled(job);
     }
     scheduler.RemoveJob(job);
 }
예제 #2
0
        //Adds a specific job to the correct queue
        public void AddJob(Job job)
        {
            job.State = JobState.Queued;
            job.TimeStamp = DateTime.Now;

            if(job.ExpectedRuntime < 30) {
                shortQueue.Enqueue(job);
            }
            else if(30 <= job.ExpectedRuntime && job.ExpectedRuntime <= 120){
                longQueue.Enqueue(job);
            }
            else{
                veryLongQueue.Enqueue(job);
            }
        }
예제 #3
0
 //Remove a job from a specified queue
 public void RemoveJob(Job job)
 {
     job.State = JobState.Cancelled;
 }
예제 #4
0
파일: Logger.cs 프로젝트: Prechtig/BDSA2012
 public void OnJobTerminated(Job job)
 {
     Console.WriteLine(string.Format("Job terminated: {0}", job));
 }
예제 #5
0
파일: Logger.cs 프로젝트: Prechtig/BDSA2012
 public void OnJobSubmitted(Job job)
 {
     Console.WriteLine(string.Format("Job submitted: {0}", job));
 }
예제 #6
0
파일: Logger.cs 프로젝트: Prechtig/BDSA2012
 public void OnJobRunning(Job job)
 {
     Console.WriteLine(string.Format("Job running: {0}", job));
 }
예제 #7
0
파일: Logger.cs 프로젝트: Prechtig/BDSA2012
 public void OnJobFailed(Job job)
 {
     Console.WriteLine(string.Format("Job failed: {0}", job));
 }
예제 #8
0
파일: Logger.cs 프로젝트: Prechtig/BDSA2012
 public void OnJobCancelled(Job job)
 {
     Console.WriteLine(string.Format("Job cancelled: {0}", job));
 }
예제 #9
0
 /// <summary>
 /// Submit a job to the benchmarksystem
 /// </summary>
 /// <param name="job">The job to submit</param>
 public void Submit(Job job)
 {
     //Notify subscribers
     if (JobSubmitted != null)
     {
         JobSubmitted(job);
     }
     scheduler.AddJob(job);
 }