개정판 6f6e7dbf
service 중복 convert 방지
mvvmtoolkit 수정
Change-Id: I860d70f64586b2893d4f98a6ea890f2a5512410e
ConvertService/ServiceBase/Markus.Service.Station/StationService/ServiceStationTask.cs | ||
---|---|---|
143 | 143 |
} |
144 | 144 |
} |
145 | 145 |
|
146 |
private void PassConvertItem(string ProjectNo,string ConvertID)
|
|
146 |
private void ReflashSubService()
|
|
147 | 147 |
{ |
148 |
foreach (var item in StationServiceList)
|
|
148 |
foreach (var subservice in StationServiceList)
|
|
149 | 149 |
{ |
150 | 150 |
try |
151 | 151 |
{ |
152 |
var aliveItems = item.Service.AliveConvertList(); |
|
153 |
|
|
154 |
if (item.Properties.PROCESS_COUNT > aliveItems.Count()) |
|
155 |
{ |
|
156 |
|
|
157 |
item.Service.ConvertAdd(ProjectNo, ConvertID); |
|
152 |
var result = subservice.Service.AliveConvertList(); |
|
158 | 153 |
|
159 |
logger.Info($"PassConvertItem - Service ID : {item.Properties.ID} ConvertID : {ConvertID}");
|
|
160 |
}
|
|
154 |
subservice.ConvertItems = result.ToList();
|
|
155 |
subservice.AliveCount = result.Count();
|
|
161 | 156 |
} |
162 | 157 |
catch (Exception ex) |
163 | 158 |
{ |
164 |
logger.Error($"PassConvertItem - Service ID : {item.Properties.ID} ConvertID : {ConvertID}",ex); |
|
159 |
logger.Error($"ReflashSubService error - Service ID : {subservice.Properties.ID} ", ex); |
|
160 |
} |
|
161 |
} |
|
162 |
} |
|
163 |
|
|
164 |
private void PassConvertItem(string ProjectNo,string ConvertID) |
|
165 |
{ |
|
166 |
|
|
167 |
ReflashSubService(); |
|
168 |
|
|
169 |
try |
|
170 |
{ |
|
171 |
|
|
172 |
if (StationServiceList.SelectMany(x => x.ConvertItems).Count(c => c.ProjectNumber == ProjectNo && c.ConvertID == ConvertID) == 0) |
|
173 |
{ |
|
174 |
var station = StationServiceList.OrderBy(x => x.AliveCount).FirstOrDefault(); |
|
175 |
|
|
176 |
if (station != null) |
|
177 |
{ |
|
178 |
var result = station.Service.ConvertAdd(ProjectNo, ConvertID); |
|
179 |
logger.Info($"PassConvertItem - Service ID : {station.Properties.ID} ConvertID : {ConvertID}"); |
|
180 |
} |
|
165 | 181 |
} |
166 | 182 |
} |
183 |
catch (Exception ex) |
|
184 |
{ |
|
185 |
logger.Error($"setDataBaseWaitingList", ex); |
|
186 |
} |
|
167 | 187 |
} |
168 | 188 |
|
169 | 189 |
private void CleanUpItems() |
내보내기 Unified diff