mirror of
https://git.vectorsigma.ru/public/photoview.git
synced 2026-08-03 21:09:05 +00:00
Refactor the Periodic Scanner module (#1210)
* Initial fix of a race condition * better logging * some refactoring and graceful shutdown * fix more potential race condition places; a better app shutdown * add test and fix some issues * some housekeeping * more descriptive asserts * Address review suggestions * Better server shutdown logic + better message about the .env file not found * Create context inside the shutdown goroutine; removed unnecessary shutdown from the main function * Move HTTP server to the main process and remove unnecessary code * log shutdown error if any * Get back to the local `scanner` variable * Protecting scanner with mutex * Adding the mutex to the shutdown function * Addressing the race condition at the init stage --------- Co-authored-by: Konstantin Koval
This commit is contained in:
@@ -53,6 +53,7 @@ require (
|
||||
github.com/rogpeppe/go-internal v1.12.0 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/sosodev/duration v1.3.1 // indirect
|
||||
github.com/stretchr/objx v0.5.2 // indirect
|
||||
github.com/urfave/cli/v2 v2.27.6 // indirect
|
||||
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
|
||||
golang.org/x/mod v0.24.0 // indirect
|
||||
|
||||
Reference in New Issue
Block a user