2020-09-22 06:51:47 +00:00
|
|
|
package searchsvc
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2021-09-28 04:46:10 +00:00
|
|
|
"github.com/nspcc-dev/neofs-node/pkg/core/client"
|
2020-12-10 12:26:40 +00:00
|
|
|
"go.uber.org/zap"
|
2020-09-22 06:51:47 +00:00
|
|
|
)
|
|
|
|
|
2021-09-28 04:46:10 +00:00
|
|
|
func (exec *execCtx) processNode(ctx context.Context, info client.NodeInfo) {
|
2021-06-22 12:19:30 +00:00
|
|
|
exec.log.Debug("processing node...")
|
2020-09-22 06:51:47 +00:00
|
|
|
|
2021-09-28 04:46:10 +00:00
|
|
|
client, ok := exec.remoteClient(info)
|
2020-12-10 12:26:40 +00:00
|
|
|
if !ok {
|
|
|
|
return
|
2020-09-29 16:44:59 +00:00
|
|
|
}
|
|
|
|
|
2021-09-28 04:46:10 +00:00
|
|
|
ids, err := client.searchObjects(exec, info)
|
2020-09-22 06:51:47 +00:00
|
|
|
|
|
|
|
if err != nil {
|
2022-10-05 06:34:17 +00:00
|
|
|
exec.log.Debug("remote operation failed",
|
2020-12-10 12:26:40 +00:00
|
|
|
zap.String("error", err.Error()),
|
|
|
|
)
|
2020-09-22 06:51:47 +00:00
|
|
|
|
2020-12-10 12:26:40 +00:00
|
|
|
return
|
2020-09-22 06:51:47 +00:00
|
|
|
}
|
|
|
|
|
2020-12-10 12:26:40 +00:00
|
|
|
exec.writeIDList(ids)
|
2020-09-22 06:51:47 +00:00
|
|
|
}
|