[#172] Use ContainersOf() for container list fetching
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
Previously we were limited by ~2048 containers because of neo-go VM limits. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
9e54646248
commit
382ecae96a
3 changed files with 4 additions and 4 deletions
|
@ -242,7 +242,7 @@ func newCachedContainerLister(c *cntClient.Client, ttl time.Duration) ttlContain
|
|||
}
|
||||
}
|
||||
|
||||
list, err := c.List(id)
|
||||
list, err := c.ContainersOf(id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ func newCachedContainerLister(c *cntClient.Client, ttl time.Duration) ttlContain
|
|||
// the cache.
|
||||
func (s ttlContainerLister) List(id *user.ID) ([]cid.ID, error) {
|
||||
if id == nil {
|
||||
return s.client.List(nil)
|
||||
return s.client.ContainersOf(nil)
|
||||
}
|
||||
|
||||
item, err := s.inner.get(id.EncodeToString())
|
||||
|
|
|
@ -31,7 +31,7 @@ func (c cnrSource) Get(id cid.ID) (*container.Container, error) {
|
|||
}
|
||||
|
||||
func (c cnrSource) List() ([]cid.ID, error) {
|
||||
return c.cli.List(nil)
|
||||
return c.cli.ContainersOf(nil)
|
||||
}
|
||||
|
||||
func initTreeService(c *cfg) {
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
var ErrInvalidIRNode = errors.New("node is not in the inner ring list")
|
||||
|
||||
func (ap *Processor) selectContainersToAudit(epoch uint64) ([]cid.ID, error) {
|
||||
containers, err := ap.containerClient.List(nil)
|
||||
containers, err := ap.containerClient.ContainersOf(nil)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("can't get list of containers to start audit: %w", err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue