减少回调
This commit is contained in:
parent
159e25ddc6
commit
eea062ce8e
|
@ -67,17 +67,16 @@ public class PacketsProcessor implements RpcProcessor<PacketsProcessor.PacketsRe
|
|||
|
||||
work.setTaskQueueSize( work.getTaskQueueSize() - request.packets.size());
|
||||
work.setUpdateAt(Instant.now());
|
||||
log.debug("workerState taskQueueSize: {} psize: {}", work.getTaskQueueSize(), request.packets.size());
|
||||
log.debug("workerState taskQueueSize: {} psize: {} state {}", work.getTaskQueueSize(), request.packets.size(), state.getWorkers().size());
|
||||
var op = new Operate(OperateType.PUT);
|
||||
op.setValue(work);
|
||||
|
||||
Operate.CallOperate(op, new OperateClosure() {
|
||||
|
||||
@Override
|
||||
public void run(Status status) {
|
||||
log.info("{}", this.getResponse());
|
||||
var resp = new RaftResponse();
|
||||
resp.setRedirect(StateServerFactory.getStateServer().getNode().getLeaderId());
|
||||
resp.setSuccess(true);
|
||||
// resp.setRedirect(StateServerFactory.getStateServer().getNode().getLeaderId());
|
||||
rpcCtx.sendResponse(resp);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user