Add log package for better logging level. (#1130)

* Add log package. Update worker with new log package.

* Add init error to worker.

* Init workers when binary launching.

* Add tests to cover different errors.
This commit is contained in:
Googol Lee
2024-11-21 10:44:38 +01:00
committed by GitHub
parent 0d69d5584e
commit a9d7b774bd
12 changed files with 289 additions and 110 deletions

View File

@@ -17,7 +17,6 @@ import (
"github.com/photoview/photoview/api/routes"
"github.com/photoview/photoview/api/scanner/exif"
"github.com/photoview/photoview/api/scanner/face_detection"
"github.com/photoview/photoview/api/scanner/media_encoding/executable_worker"
"github.com/photoview/photoview/api/scanner/periodic_scanner"
"github.com/photoview/photoview/api/scanner/scanner_queue"
"github.com/photoview/photoview/api/server"
@@ -54,8 +53,6 @@ func main() {
log.Panicf("Could not initialize periodic scanner: %s", err)
}
executable_worker.InitializeExecutableWorkers()
exif.InitializeEXIFParser()
if err := face_detection.InitializeFaceDetector(db); err != nil {