Search in sources :

Example 1 with BuildSharedPhaseStatus

use of com.qlangtech.tis.fullbuild.phasestatus.impl.BuildSharedPhaseStatus in project tis by qlangtech.

the class IncrStatusUmbilicalProtocolImpl method reportBuildIndexStatus.

@Override
public void reportBuildIndexStatus(com.qlangtech.tis.rpc.grpc.log.common.BuildSharedPhaseStatus buildStatus, StreamObserver<Empty> responseObserver) {
    Integer taskid = buildStatus.getTaskid();
    if (taskid == null) {
        throw new IllegalArgumentException("taskid can not be null");
    }
    PhaseStatusCollection phaseStatusSet = TrackableExecuteInterceptor.getTaskPhaseReference(taskid);
    if (phaseStatusSet == null) {
        log.warn("taskid:" + taskid + " relevent phaseStatusSet is null");
        returnEmpty(responseObserver);
        return;
    }
    BuildPhaseStatus status = phaseStatusSet.getBuildPhase();
    BuildSharedPhaseStatus sharedBuildStatus = status.getBuildSharedPhaseStatus(buildStatus.getSharedName());
    if (!sharedBuildStatus.isFaild()) {
        sharedBuildStatus.setFaild(buildStatus.getFaild());
    }
    if (!sharedBuildStatus.isComplete()) {
        sharedBuildStatus.setComplete(buildStatus.getComplete());
    }
    if (sharedBuildStatus.isWaiting()) {
        sharedBuildStatus.setWaiting(buildStatus.getWaiting());
    }
    sharedBuildStatus.setAllBuildSize(buildStatus.getAllBuildSize());
    sharedBuildStatus.setBuildReaded(buildStatus.getBuildReaded());
    status.isComplete();
    returnEmpty(responseObserver);
}
Also used : PhaseStatusCollection(com.qlangtech.tis.fullbuild.phasestatus.PhaseStatusCollection) BuildSharedPhaseStatus(com.qlangtech.tis.fullbuild.phasestatus.impl.BuildSharedPhaseStatus) BuildPhaseStatus(com.qlangtech.tis.fullbuild.phasestatus.impl.BuildPhaseStatus)

Aggregations

PhaseStatusCollection (com.qlangtech.tis.fullbuild.phasestatus.PhaseStatusCollection)1 BuildPhaseStatus (com.qlangtech.tis.fullbuild.phasestatus.impl.BuildPhaseStatus)1 BuildSharedPhaseStatus (com.qlangtech.tis.fullbuild.phasestatus.impl.BuildSharedPhaseStatus)1