fix restore func misnaming in onedrive (#3616)
#### Does this PR need a docs update or release note? - [x] ⛔ No #### Type of change - [x] 🧹 Tech Debt/Cleanup #### Issue(s) * #1996
This commit is contained in:
parent
61de33cbd3
commit
466698f096
@ -59,8 +59,8 @@ func NewRestoreCaches() *restoreCaches {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// RestoreCollections will restore the specified data collections into OneDrive
|
// ConsumeRestoreCollections will restore the specified data collections into OneDrive
|
||||||
func RestoreCollections(
|
func ConsumeRestoreCollections(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
rh RestoreHandler,
|
rh RestoreHandler,
|
||||||
backupVersion int,
|
backupVersion int,
|
||||||
@ -102,7 +102,7 @@ func RestoreCollections(
|
|||||||
"full_path", dc.FullPath())
|
"full_path", dc.FullPath())
|
||||||
)
|
)
|
||||||
|
|
||||||
metrics, err = ProduceRestoreCollection(
|
metrics, err = RestoreCollection(
|
||||||
ictx,
|
ictx,
|
||||||
rh,
|
rh,
|
||||||
backupVersion,
|
backupVersion,
|
||||||
@ -133,12 +133,12 @@ func RestoreCollections(
|
|||||||
return status, el.Failure()
|
return status, el.Failure()
|
||||||
}
|
}
|
||||||
|
|
||||||
// ProduceRestoreCollection handles restoration of an individual collection.
|
// RestoreCollection handles restoration of an individual collection.
|
||||||
// returns:
|
// returns:
|
||||||
// - the collection's item and byte count metrics
|
// - the collection's item and byte count metrics
|
||||||
// - the updated metadata map that include metadata for folders in this collection
|
// - the updated metadata map that include metadata for folders in this collection
|
||||||
// - error, if any besides recoverable
|
// - error, if any besides recoverable
|
||||||
func ProduceRestoreCollection(
|
func RestoreCollection(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
rh RestoreHandler,
|
rh RestoreHandler,
|
||||||
backupVersion int,
|
backupVersion int,
|
||||||
|
|||||||
@ -45,7 +45,7 @@ func (ctrl *Controller) ConsumeRestoreCollections(
|
|||||||
case selectors.ServiceExchange:
|
case selectors.ServiceExchange:
|
||||||
status, err = exchange.ConsumeRestoreCollections(ctx, ctrl.AC, restoreCfg, dcs, deets, errs)
|
status, err = exchange.ConsumeRestoreCollections(ctx, ctrl.AC, restoreCfg, dcs, deets, errs)
|
||||||
case selectors.ServiceOneDrive:
|
case selectors.ServiceOneDrive:
|
||||||
status, err = onedrive.RestoreCollections(
|
status, err = onedrive.ConsumeRestoreCollections(
|
||||||
ctx,
|
ctx,
|
||||||
onedrive.NewRestoreHandler(ctrl.AC),
|
onedrive.NewRestoreHandler(ctrl.AC),
|
||||||
backupVersion,
|
backupVersion,
|
||||||
|
|||||||
@ -65,7 +65,7 @@ func ConsumeRestoreCollections(
|
|||||||
|
|
||||||
switch dc.FullPath().Category() {
|
switch dc.FullPath().Category() {
|
||||||
case path.LibrariesCategory:
|
case path.LibrariesCategory:
|
||||||
metrics, err = onedrive.ProduceRestoreCollection(
|
metrics, err = onedrive.RestoreCollection(
|
||||||
ictx,
|
ictx,
|
||||||
libraryRestoreHandler{ac.Drives()},
|
libraryRestoreHandler{ac.Drives()},
|
||||||
backupVersion,
|
backupVersion,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user