forked from TrueCloudLab/frostfs-node
[#185] ir: Resolve containedctx linter
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
c1cbe6ff2d
commit
8426d25f4b
3 changed files with 14 additions and 34 deletions
|
@ -100,12 +100,11 @@ func (c *ClientCache) getSG(ctx context.Context, addr oid.Address, nm *netmap.Ne
|
|||
continue
|
||||
}
|
||||
|
||||
cctx, cancel := context.WithTimeout(ctx, c.sgTimeout)
|
||||
getObjPrm.SetContext(cctx)
|
||||
ctx, cancel := context.WithTimeout(ctx, c.sgTimeout)
|
||||
|
||||
// NOTE: we use the function which does not verify object integrity (checksums, signature),
|
||||
// but it would be useful to do as part of a data audit.
|
||||
res, err := cli.GetObject(getObjPrm)
|
||||
res, err := cli.GetObject(ctx, getObjPrm)
|
||||
|
||||
cancel()
|
||||
|
||||
|
@ -223,10 +222,9 @@ func (c ClientCache) ListSG(dst *storagegroup2.SearchSGDst, prm storagegroup2.Se
|
|||
|
||||
var cliPrm frostfsapiclient.SearchSGPrm
|
||||
|
||||
cliPrm.SetContext(prm.Context)
|
||||
cliPrm.SetContainerID(prm.Container)
|
||||
|
||||
res, err := cli.SearchSG(cliPrm)
|
||||
res, err := cli.SearchSG(prm.Context, cliPrm)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue