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,
|
||||
) {
|
||||
var (
|
||||
category path.CategoryType
|
||||
success int64
|
||||
totalBytes int64
|
||||
wg sync.WaitGroup
|
||||
colProgress chan<- struct{}
|
||||
|
||||
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() {
|
||||
close(stream)
|
||||
updateStatus(
|
||||
@ -346,12 +354,19 @@ func (col *lazyFetchCollection) streamItems(
|
||||
errs *fault.Bus,
|
||||
) {
|
||||
var (
|
||||
category path.CategoryType
|
||||
success int64
|
||||
colProgress chan<- struct{}
|
||||
|
||||
user = col.user
|
||||
)
|
||||
|
||||
if col.FullPath() != nil {
|
||||
category = col.FullPath().Category()
|
||||
} else {
|
||||
category = col.PreviousPath().Category()
|
||||
}
|
||||
|
||||
defer func() {
|
||||
close(stream)
|
||||
updateStatus(
|
||||
@ -400,7 +415,7 @@ func (col *lazyFetchCollection) streamItems(
|
||||
"item_id", id,
|
||||
"parent_path", path.LoggableDir(parentPath),
|
||||
"service", path.ExchangeService.String(),
|
||||
"category", col.FullPath().Category().String())
|
||||
"category", category.String())
|
||||
|
||||
stream <- &lazyItem{
|
||||
ctx: ictx,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user