Skip to content

Commit

Permalink
fix log
Browse files Browse the repository at this point in the history
  • Loading branch information
fyInALT committed Apr 3, 2024
1 parent 0c9894b commit dafd537
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions operator/rpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (c *AggregatorRpcClient) InitOperatorToAggregator() error {
RegistryCoordinatorAddr: c.RegistryCoordinatorAddr,
}

c.logger.Info("Create task header to aggregator", "req", fmt.Sprintf("%#v", req))
c.logger.Info("Init operator to aggregator", "req", fmt.Sprintf("%#v", req))

for i := 0; i < 5; i++ {
err := c.rpcClient.Call("Aggregator.InitOperator", req, &reply)
Expand Down Expand Up @@ -134,7 +134,7 @@ func (c *AggregatorRpcClient) CreateAlertTaskToAggregator(alertHash [32]byte) (*
AlertHash: alertHash,
}

c.logger.Info("Create task header to aggregator", "req", fmt.Sprintf("%#v", req))
c.logger.Info("Create task to aggregator", "req", fmt.Sprintf("%#v", req))

for i := 0; i < 5; i++ {
err := c.rpcClient.Call("Aggregator.CreateTask", req, &reply)
Expand All @@ -144,16 +144,16 @@ func (c *AggregatorRpcClient) CreateAlertTaskToAggregator(alertHash [32]byte) (*
return nil, err
}
} else {
c.logger.Info("create task response header accepted by aggregator.", "reply", reply)
c.logger.Info("create task accepted by aggregator.", "reply", reply)
c.metrics.IncNumTasksAcceptedByAggregator()
return &reply.Info, nil
}
c.logger.Infof("Retrying in 2 seconds")
time.Sleep(2 * time.Second)
}
c.logger.Errorf("Could not send signed task response to aggregator. Tried 5 times.")
c.logger.Errorf("Could not create task to aggregator. Tried 5 times.")

return nil, fmt.Errorf("Could not send signed task response to aggregator")
return nil, fmt.Errorf("Could not create task to aggregator")
}

// SendSignedTaskResponseToAggregator sends a signed task response to the aggregator.
Expand Down

0 comments on commit dafd537

Please sign in to comment.