@@ -256,17 +256,13 @@ class RequestHandler(configuration: Configuration, authDao: AuthDAO, instanceDao
256
256
}
257
257
log.debug(s " Applied matching result $matchingSuccess to instance with id $matchedInstanceId. " )
258
258
259
- // santosh
260
-
261
259
// Update link state
262
260
if (! matchingSuccess) {
263
-
264
261
val link = InstanceLink (callerId, matchedInstanceId, LinkState .Failed )
265
-
266
262
instanceDao.updateLink(link) match {
267
263
case Success (_) =>
268
264
fireLinkStateChangedEvent(link)
269
- handleMultipleList (matchedInstanceId)
265
+ handleLinksUpdate (matchedInstanceId)
270
266
OperationResult .Ok
271
267
case Failure (_) => OperationResult .InternalError // Should not happen
272
268
}
@@ -278,17 +274,17 @@ class RequestHandler(configuration: Configuration, authDao: AuthDAO, instanceDao
278
274
}
279
275
280
276
281
- def handleMultipleList (matchedInstanceId : Long ) = {
277
+ def handleLinksUpdate (matchedInstanceId : Long ): Unit = {
282
278
283
279
val getlinkFrom = instanceDao.getLinksTo(matchedInstanceId)
284
280
for (linklist <- getlinkFrom) {
285
281
if (linklist.linkState != LinkState .Failed ) {
286
- log.info (s " value in new block is From: ${linklist.idFrom}, MI: $matchedInstanceId To: ${linklist.idTo}" )
282
+ log.debug (s " value in new block is From: ${linklist.idFrom}, MI: $matchedInstanceId To: ${linklist.idTo}" )
287
283
val link = InstanceLink (linklist.idFrom, matchedInstanceId, LinkState .Failed )
288
284
instanceDao.updateLink(link) match {
289
285
case Success (_) =>
290
286
fireLinkStateChangedEvent(link)
291
- case Failure (ex) => log.warning(s " There was a failure while updating the link state ${ex.getMessage}" ) // Should not happen
287
+ case Failure (ex) => log.warning(s " There was a failure while updating the link state ${ex.getMessage}" )
292
288
}
293
289
}
294
290
}
0 commit comments