Updates to sharepoint/collection.go
Changes to troubleshoot Issue #2257
This commit is contained in:
parent
9799add342
commit
f84e4e9239
@ -149,7 +149,7 @@ func (sc *Collection) finishPopulation(ctx context.Context, attempts, success in
|
|||||||
status := support.CreateStatus(
|
status := support.CreateStatus(
|
||||||
ctx,
|
ctx,
|
||||||
support.Backup,
|
support.Backup,
|
||||||
len(sc.jobs),
|
1, // 1 folder
|
||||||
support.CollectionMetrics{
|
support.CollectionMetrics{
|
||||||
Objects: attempted,
|
Objects: attempted,
|
||||||
Successes: success,
|
Successes: success,
|
||||||
@ -172,6 +172,9 @@ func (sc *Collection) populate(ctx context.Context) {
|
|||||||
writer = kw.NewJsonSerializationWriter()
|
writer = kw.NewJsonSerializationWriter()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
defer func() {
|
||||||
|
sc.finishPopulation(ctx, metrics.attempts, metrics.success, int64(metrics.success), errs)
|
||||||
|
}()
|
||||||
// TODO: Insert correct ID for CollectionProgress
|
// TODO: Insert correct ID for CollectionProgress
|
||||||
colProgress, closer := observe.CollectionProgress(
|
colProgress, closer := observe.CollectionProgress(
|
||||||
ctx,
|
ctx,
|
||||||
@ -182,7 +185,6 @@ func (sc *Collection) populate(ctx context.Context) {
|
|||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
close(colProgress)
|
close(colProgress)
|
||||||
sc.finishPopulation(ctx, metrics.attempts, metrics.success, metrics.totalBytes, errs)
|
|
||||||
}()
|
}()
|
||||||
|
|
||||||
// Switch retrieval function based on category
|
// Switch retrieval function based on category
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user