mirror of
https://github.com/rclone/rclone.git
synced 2025-08-09 05:54:43 +02:00
cache: Implement --cache-db-wait-time flag
This can be used to make the cache wait for other running cache backends to finish rather than erroring after 1 second.
This commit is contained in:
2
backend/cache/storage_persistent.go
vendored
2
backend/cache/storage_persistent.go
vendored
@ -122,7 +122,7 @@ func (b *Persistent) connect() error {
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "failed to create a data directory %q", b.dataPath)
|
||||
}
|
||||
b.db, err = bolt.Open(b.dbPath, 0644, &bolt.Options{Timeout: 1 * time.Second})
|
||||
b.db, err = bolt.Open(b.dbPath, 0644, &bolt.Options{Timeout: *cacheDbWaitTime})
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "failed to open a cache connection to %q", b.dbPath)
|
||||
}
|
||||
|
Reference in New Issue
Block a user