Search in sources :

Example 1 with BackplaneStatus

use of build.buildfarm.v1test.BackplaneStatus in project bazel-buildfarm by bazelbuild.

the class MemoryInstance method backplaneStatus.

@Override
public BackplaneStatus backplaneStatus() {
    BackplaneStatus.Builder status = BackplaneStatus.newBuilder();
    OperationQueueStatus.Builder queueStatus = status.getOperationQueueBuilder();
    long totalSize = 0;
    for (WorkerQueue queue : queuedOperations) {
        long size = queue.operations.size();
        queueStatus.addProvisionsBuilder().setName(queue.name).setSize(size);
        totalSize += size;
    }
    queueStatus.setSize(totalSize);
    // TODO active workers - available, but not with any discerning identifier, should rectify this
    return status.build();
}
Also used : BackplaneStatus(build.buildfarm.v1test.BackplaneStatus) WorkerQueue(build.buildfarm.instance.queues.WorkerQueue) OperationQueueStatus(build.buildfarm.v1test.OperationQueueStatus)

Aggregations

WorkerQueue (build.buildfarm.instance.queues.WorkerQueue)1 BackplaneStatus (build.buildfarm.v1test.BackplaneStatus)1 OperationQueueStatus (build.buildfarm.v1test.OperationQueueStatus)1