Exemplo n.º 1
0
 /// <summary>
 /// 
 /// </summary>
 /// <returns>task number</returns>
 public int BeginJob(int priority, string username)
 {
     Log.Info($"Starting a new job with priority {priority}. Username: {username}");
     var t = new JobInfo(++_taskNumber) {Priority = priority, Username = username};
     _taskDictionary.AddOrUpdate(t.Number, t, (key, value) => value);
     CheckHostNames();
     return _taskNumber;
 }
Exemplo n.º 2
0
 private void DeletePoint(JobInfo ti, int pointNum)
 {
     ti.RemovePoint(pointNum, ti.IsCancelled);
 }