[#186] policer: Use new storage engine for work
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
1b867e53d7
commit
aa9eb2eaf2
2 changed files with 5 additions and 5 deletions
|
@ -5,7 +5,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/core/container"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/localstore"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/network"
|
||||
headsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/head"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/object_manager/placement"
|
||||
|
@ -108,7 +108,7 @@ func WithLogger(v *logger.Logger) Option {
|
|||
}
|
||||
|
||||
// WithLocalStorage returns option to set local object storage of Policer.
|
||||
func WithLocalStorage(v *localstore.Storage) Option {
|
||||
func WithLocalStorage(v *engine.StorageEngine) Option {
|
||||
return func(c *cfg) {
|
||||
c.jobQueue.localStorage = v
|
||||
}
|
||||
|
|
|
@ -2,11 +2,11 @@ package policer
|
|||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-api-go/pkg/object"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/localstore"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/engine"
|
||||
)
|
||||
|
||||
type jobQueue struct {
|
||||
localStorage *localstore.Storage
|
||||
localStorage *engine.StorageEngine
|
||||
}
|
||||
|
||||
var jobFilter object.SearchFilters
|
||||
|
@ -17,7 +17,7 @@ func (q *jobQueue) Select(limit int) ([]*object.Address, error) {
|
|||
// It is recommended to make changes after updating the metabase
|
||||
|
||||
// FIXME: add the ability to limit Select result
|
||||
res, err := q.localStorage.Select(getJobFilter())
|
||||
res, err := engine.Select(q.localStorage, getJobFilter())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue