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()
|
||||
if fpath, ok = hasTrimPrefix(path, core.IndexPrefix); ok {
|
||||
err = scanFile(ctx.Srv, fpath)
|
||||
if err != nil {
|
||||
ctx.Srv.Log.Printf("index: %s", err)
|
||||
}
|
||||
} else if fpath, ok = hasTrimPrefix(path, core.RetagPrefix); ok {
|
||||
if fpath == "" {
|
||||
go func() {
|
||||
|
|
@ -222,7 +225,10 @@ func indexHandler(ctx *Context) {
|
|||
ctx.Srv.DB.IndexMutex.Set(uint64(len(files)))
|
||||
for _, f := range files {
|
||||
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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue