- Timestamp:
- 05/10/16 16:55:18 (9 years ago)
- Location:
- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Hubs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Hubs/JobUpdaterHub.cs
r13739 r13841 32 32 else { 33 33 userId = Guid.Parse(uid); 34 fileopener = weblog.get FileOpener(userId);34 fileopener = weblog.getJobOpener(userId); 35 35 } 36 36 } -
branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Hubs/ProgressHub.cs
r13834 r13841 103 103 } 104 104 } 105 Clients.Caller.processMessage("Connection Established"); 106 } 107 public void changeName(int[][] arr, string name, int idname) 108 { 109 110 if (name != "" && name != null) 111 { 112 loader(); 113 114 HiveTask current = fileopener.Job.HiveTasks.ToList()[0]; 115 if (arr.Length == 0) 116 {//check if upper job 117 current.ItemTask.Name = name; 118 119 } 120 else 121 { 122 for (var i = 0; i < arr.Length; i++) 123 {//loop for depth 124 if (i == arr.Length - 1) 125 {//Right depth reached, change name for current 126 if (current.ItemTask.Item is BatchRun) 127 { 128 current.ChildHiveTasks[arr[i][1]].ItemTask.Name = name; 129 } 130 else if (current.ItemTask.Item is Experiment) 131 { 132 current.ChildHiveTasks[arr[i][0]].ItemTask.Name = name; 133 } 134 135 } 136 else 137 {//not deep enough, choose right path 138 if (current.ItemTask.Item is BatchRun) 139 current = current.ChildHiveTasks[arr[i][1]]; // select right batch 140 else if (current.ItemTask.Item is Experiment) 141 current = current.ChildHiveTasks[arr[i][0]]; // select right sub task from experiment 142 } 143 } 144 } 145 Clients.Caller.processName(name, idname); 146 } 147 } 148 public void changeRepit(int[][] arr, int repit) 149 { 150 loader(); 151 HiveTask current = fileopener.Job.HiveTasks.ToList()[0]; 152 string Name = "failed"; 153 if (arr.Length == 0) 154 {//check if upper job 155 if (current.ItemTask.Item is BatchRun) 156 { 157 var b = (BatchRun)current.ItemTask.Item; 158 b.Repetitions = repit; 159 Name = current.ItemTask.Name; 160 } 161 162 } 163 else 164 { 165 for (var i = 0; i < arr.Length; i++) 166 {//loop for depth 167 if (i == arr.Length - 1) 168 {//Right depth reached, change name for current 169 if (current.ChildHiveTasks[arr[i][0]].ItemTask.Item is BatchRun) 170 { 171 var b = (BatchRun)current.ChildHiveTasks[arr[i][0]].ItemTask.Item; 172 b.Repetitions = repit; 173 Name = current.ChildHiveTasks[arr[i][0]].ItemTask.Name; 174 } 175 } 176 else 177 {//not deep enough, choose right path 178 if (current.ItemTask.Item is BatchRun) 179 current = current.ChildHiveTasks[arr[i][1]]; // select right batch 180 else if (current.ItemTask.Item is Experiment) 181 current = current.ChildHiveTasks[arr[i][0]]; // select right sub task from experiment 182 } 183 } 184 } 185 Clients.Caller.processRepit(Name, repit); 186 105 187 } 106 188 /// <summary>
Note: See TracChangeset
for help on using the changeset viewer.