Simplify scanner utilization

This commit is contained in:
Deluan
2020-11-01 18:37:17 -05:00
parent 71b77cba2b
commit ee5a0698c0
4 changed files with 63 additions and 71 deletions
+7 -1
View File
@@ -48,7 +48,13 @@ func (c *LibraryScanningController) StartScan(w http.ResponseWriter, r *http.Req
}
fullScan := utils.ParamBool(r, "fullScan", false)
c.scanner.RescanAll(fullScan)
go func() {
err := c.scanner.RescanAll(fullScan)
if err != nil {
log.Error(r.Context(), err)
}
}()
return c.GetScanStatus(w, r)
}