mirror of
https://github.com/rclone/rclone.git
synced 2025-02-13 09:01:08 +01:00
drive: tweak pacer to speed up directory listings and make more reliable
This commit is contained in:
parent
0166544319
commit
2119fb4314
@ -36,8 +36,9 @@ const (
|
|||||||
timeFormatIn = time.RFC3339
|
timeFormatIn = time.RFC3339
|
||||||
timeFormatOut = "2006-01-02T15:04:05.000000000Z07:00"
|
timeFormatOut = "2006-01-02T15:04:05.000000000Z07:00"
|
||||||
minSleep = 10 * time.Millisecond
|
minSleep = 10 * time.Millisecond
|
||||||
maxSleep = 2 * time.Second
|
maxSleep = 2000 * time.Millisecond
|
||||||
decayConstant = 2 // bigger for slower decay, exponential
|
decayConstant = 0 // bigger for slower decay, exponential
|
||||||
|
attackConstant = 0 // bigger for slower attack, exponential
|
||||||
defaultExtensions = "docx,xlsx,pptx,svg"
|
defaultExtensions = "docx,xlsx,pptx,svg"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -291,7 +292,7 @@ func NewFs(name, path string) (fs.Fs, error) {
|
|||||||
f := &Fs{
|
f := &Fs{
|
||||||
name: name,
|
name: name,
|
||||||
root: root,
|
root: root,
|
||||||
pacer: pacer.New().SetMinSleep(minSleep).SetMaxSleep(maxSleep).SetDecayConstant(decayConstant),
|
pacer: pacer.New().SetMinSleep(minSleep).SetMaxSleep(maxSleep).SetDecayConstant(decayConstant).SetAttackConstant(attackConstant),
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a new authorized Drive client.
|
// Create a new authorized Drive client.
|
||||||
|
Loading…
Reference in New Issue
Block a user