added more logging
This commit is contained in:
parent
c87309c572
commit
b1fb0554ad
1 changed files with 7 additions and 1 deletions
|
|
@ -185,6 +185,9 @@ func indexHandler(ctx *Context) {
|
||||||
path := ctx.Path()
|
path := ctx.Path()
|
||||||
if fpath, ok = hasTrimPrefix(path, core.IndexPrefix); ok {
|
if fpath, ok = hasTrimPrefix(path, core.IndexPrefix); ok {
|
||||||
err = scanFile(ctx.Srv, fpath)
|
err = scanFile(ctx.Srv, fpath)
|
||||||
|
if err != nil {
|
||||||
|
ctx.Srv.Log.Printf("index: %s", err)
|
||||||
|
}
|
||||||
} else if fpath, ok = hasTrimPrefix(path, core.RetagPrefix); ok {
|
} else if fpath, ok = hasTrimPrefix(path, core.RetagPrefix); ok {
|
||||||
if fpath == "" {
|
if fpath == "" {
|
||||||
go func() {
|
go func() {
|
||||||
|
|
@ -222,7 +225,10 @@ func indexHandler(ctx *Context) {
|
||||||
ctx.Srv.DB.IndexMutex.Set(uint64(len(files)))
|
ctx.Srv.DB.IndexMutex.Set(uint64(len(files)))
|
||||||
for _, f := range files {
|
for _, f := range files {
|
||||||
if !ctx.Srv.DB.IsIndexed(f) {
|
if !ctx.Srv.DB.IsIndexed(f) {
|
||||||
scanFile(ctx.Srv, f)
|
err := scanFile(ctx.Srv, f)
|
||||||
|
if err != nil {
|
||||||
|
ctx.Srv.Log.Printf("indexAll: %s", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ctx.Srv.DB.IndexMutex.Inc()
|
ctx.Srv.DB.IndexMutex.Inc()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue