fix(index): update indexes in database

This commit is contained in:
Noah Hsu
2022-12-05 20:23:37 +08:00
parent dda1da4576
commit f1a9b68022
3 changed files with 16 additions and 5 deletions

View File

@ -59,11 +59,11 @@ func List(ctx context.Context, storage driver.Driver, path string, args model.Li
return nil, errors.Wrapf(err, "failed to list objs")
}
// call hooks
go func() {
go func(reqPath string, files []model.Obj) {
for _, hook := range objsUpdateHooks {
hook(args.ReqPath, files)
}
}()
}(args.ReqPath, files)
if !storage.Config().NoCache {
if len(files) > 0 {
log.Debugf("set cache: %s => %+v", key, files)