mirror of
https://github.com/rclone/rclone.git
synced 2026-01-06 02:23:24 +00:00
Add context propagation to rclone
- Change rclone/fs interfaces to accept context.Context - Update interface implementations to use context.Context - Change top level usage to propagate context to lover level functions Context propagation is needed for stopping transfers and passing other request-scoped values.
This commit is contained in:
committed by
Nick Craig-Wood
parent
a2c317b46e
commit
f78cd1e043
@@ -1,6 +1,8 @@
|
||||
package settier
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/ncw/rclone/cmd"
|
||||
"github.com/ncw/rclone/fs/operations"
|
||||
"github.com/pkg/errors"
|
||||
@@ -48,7 +50,7 @@ Or just provide remote directory and all files in directory will be tiered
|
||||
return errors.Errorf("Remote %s does not support settier", fsrc.Name())
|
||||
}
|
||||
|
||||
return operations.SetTier(fsrc, tier)
|
||||
return operations.SetTier(context.Background(), fsrc, tier)
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user