| | |
| | | @Override |
| | | public Object execute() throws Exception { |
| | | while(!this.stop){ |
| | | if(!runDemo()){ |
| | | if(!runInDemo()){ |
| | | this.stop = true ; |
| | | }else{ |
| | | try { |
| | |
| | | } |
| | | } |
| | | } |
| | | private boolean runDemo(){ |
| | | private boolean runInDemo(){ |
| | | for(UpgradeRtu rtu : cache.ugRtuStateList){ |
| | | this.rtuUpgrade(rtu) ; |
| | | } |
| | |
| | | for(UpgradeRtu rtu : cache.ugRtuStateList){ |
| | | if(rtu.state == UpgradeRtu.STATE_OFFLINE){ |
| | | cache.ugOverallState.offLineTotal ++ ; |
| | | cache.ugOverallState.failTotal++; |
| | | }else if(rtu.state == UpgradeRtu.STATE_UNSTART){ |
| | | cache.ugOverallState.unStartTotal ++ ; |
| | | }else if(rtu.state == UpgradeRtu.STATE_RUNNING){ |
| | |
| | | cache.ugOverallState.failOneTotal++; |
| | | cache.ugOverallState.failTotal++; |
| | | }else if(rtu.state == UpgradeRtu.STATE_FAIL) { |
| | | cache.ugOverallState.failMultiTotal++; |
| | | cache.ugOverallState.failTotal++; |
| | | } |
| | | if(rtu.isOver){ |