Remove extra Graph API call
This commit is contained in:
parent
fe0642c88d
commit
c2330e7262
@ -333,13 +333,17 @@ func (oc *Collection) populateItems(ctx context.Context, errs *fault.Bus) {
|
|||||||
"backup_item_size", itemSize,
|
"backup_item_size", itemSize,
|
||||||
)
|
)
|
||||||
|
|
||||||
pr, err := fetchParentReference(ctx, oc.service, item.GetParentReference())
|
// TODO: Removing the logic below because it introduces an extra Graph API call for
|
||||||
if err != nil {
|
// every item being backed up. This can lead to throttling errors.
|
||||||
el.AddRecoverable(clues.Wrap(err, "getting parent reference").Label(fault.LabelForceNoBackupCreation))
|
//
|
||||||
return
|
// pr, err := fetchParentReference(ctx, oc.service, item.GetParentReference())
|
||||||
}
|
// if err != nil {
|
||||||
|
// el.AddRecoverable(clues.Wrap(err, "getting parent reference").Label(fault.LabelForceNoBackupCreation))
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
|
||||||
|
// item.SetParentReference(pr)
|
||||||
|
|
||||||
item.SetParentReference(pr)
|
|
||||||
isFile := item.GetFile() != nil
|
isFile := item.GetFile() != nil
|
||||||
|
|
||||||
if isFile {
|
if isFile {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user