Fix extracting category from BaseCollection (#4323)
#### Does this PR need a docs update or release note? - [ ] ✅ Yes, it's included - [ ] 🕐 Yes, but in a later PR - [x] ⛔ No #### Type of change - [ ] 🌻 Feature - [x] 🐛 Bugfix - [ ] 🗺️ Documentation - [ ] 🤖 Supportability/Tests - [ ] 💻 CI/Deployment - [ ] 🧹 Tech Debt/Cleanup #### Test Plan - [x] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
f767b67eca
commit
c3e63413d4
@ -186,17 +186,25 @@ func (col *prefetchCollection) streamItems(
|
|||||||
errs *fault.Bus,
|
errs *fault.Bus,
|
||||||
) {
|
) {
|
||||||
var (
|
var (
|
||||||
|
category path.CategoryType
|
||||||
success int64
|
success int64
|
||||||
totalBytes int64
|
totalBytes int64
|
||||||
wg sync.WaitGroup
|
wg sync.WaitGroup
|
||||||
colProgress chan<- struct{}
|
colProgress chan<- struct{}
|
||||||
|
|
||||||
user = col.user
|
user = col.user
|
||||||
log = logger.Ctx(ctx).With(
|
|
||||||
"service", path.ExchangeService.String(),
|
|
||||||
"category", col.FullPath().Category().String())
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if col.FullPath() != nil {
|
||||||
|
category = col.FullPath().Category()
|
||||||
|
} else {
|
||||||
|
category = col.PreviousPath().Category()
|
||||||
|
}
|
||||||
|
|
||||||
|
log := logger.Ctx(ctx).With(
|
||||||
|
"service", path.ExchangeService.String(),
|
||||||
|
"category", category.String())
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
close(stream)
|
close(stream)
|
||||||
updateStatus(
|
updateStatus(
|
||||||
@ -346,12 +354,19 @@ func (col *lazyFetchCollection) streamItems(
|
|||||||
errs *fault.Bus,
|
errs *fault.Bus,
|
||||||
) {
|
) {
|
||||||
var (
|
var (
|
||||||
|
category path.CategoryType
|
||||||
success int64
|
success int64
|
||||||
colProgress chan<- struct{}
|
colProgress chan<- struct{}
|
||||||
|
|
||||||
user = col.user
|
user = col.user
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if col.FullPath() != nil {
|
||||||
|
category = col.FullPath().Category()
|
||||||
|
} else {
|
||||||
|
category = col.PreviousPath().Category()
|
||||||
|
}
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
close(stream)
|
close(stream)
|
||||||
updateStatus(
|
updateStatus(
|
||||||
@ -400,7 +415,7 @@ func (col *lazyFetchCollection) streamItems(
|
|||||||
"item_id", id,
|
"item_id", id,
|
||||||
"parent_path", path.LoggableDir(parentPath),
|
"parent_path", path.LoggableDir(parentPath),
|
||||||
"service", path.ExchangeService.String(),
|
"service", path.ExchangeService.String(),
|
||||||
"category", col.FullPath().Category().String())
|
"category", category.String())
|
||||||
|
|
||||||
stream <- &lazyItem{
|
stream <- &lazyItem{
|
||||||
ctx: ictx,
|
ctx: ictx,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user