use of org.openkilda.wfm.topology.flowhs.fsm.yflow.update.YFlowUpdateFsm in project open-kilda by telstra.
the class YFlowUpdateService method handleTimeout.
/**
* Handles timeout case.
*
* @param key command identifier.
*/
public void handleTimeout(@NonNull String key) throws UnknownKeyException {
log.debug("Handling timeout for {}", key);
YFlowUpdateFsm fsm = fsmRegister.getFsmByKey(key).orElseThrow(() -> new UnknownKeyException(key));
// Propagate timeout event to all sub-flow processing FSMs.
fsm.getUpdatingSubFlows().forEach(flowId -> {
try {
flowUpdateService.handleTimeoutByFlowId(flowId);
} catch (UnknownKeyException e) {
log.error("Failed to handle a timeout event by FlowUpdateService for {}.", flowId);
}
});
fsmExecutor.fire(fsm, Event.TIMEOUT);
removeIfFinished(fsm, key);
}
Aggregations