This commit is contained in:
parent
1871e1c26f
commit
03eb3541a5
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ func manageScan(stop chan bool, scanPool *workerpool.WorkerPool, hashPool *worke
|
||||||
hashRunning = false
|
hashRunning = false
|
||||||
}()
|
}()
|
||||||
|
|
||||||
rows, err := db.Query(ctx, "SELECT id FROM files WHERE status = $1 OR status = $2 LIMIT 10", constants.FILE_STATUS_CHANGED, constants.FILE_STATUS_NEW)
|
rows, err := db.Query(ctx, "SELECT f.id FROM files f INNER JOIN libraries l ON f.library_id = l.id WHERE l.enabled = true AND (f.status = $1 OR f.status = $2) LIMIT 10", constants.FILE_STATUS_CHANGED, constants.FILE_STATUS_NEW)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if !errors.Is(err, pgx.ErrNoRows) {
|
if !errors.Is(err, pgx.ErrNoRows) {
|
||||||
slog.ErrorContext(ctx, "Error Getting Files for Hashing", "err", err)
|
slog.ErrorContext(ctx, "Error Getting Files for Hashing", "err", err)
|
||||||
|
|
Loading…
Add table
Reference in a new issue