WebDAV: Changes trigger auto indexing / importing #281

The safety delay may be configured individually using
PHOTOPRISM_AUTO_INDEX and PHOTOPRISM_AUTO_IMPORT. A negative value
disables the feature.
This commit is contained in:
Michael Mayer
2021-01-02 18:56:15 +01:00
parent 51fe6cf526
commit ff758c3ed6
15 changed files with 459 additions and 9 deletions

View File

@@ -9,6 +9,8 @@ import (
"syscall"
"time"
"github.com/photoprism/photoprism/internal/auto"
"github.com/photoprism/photoprism/internal/photoprism"
"github.com/photoprism/photoprism/internal/config"
@@ -117,6 +119,7 @@ func startAction(ctx *cli.Context) error {
// start share & sync workers
workers.Start(conf)
auto.Start(conf)
// set up proper shutdown of daemon and web server
quit := make(chan os.Signal)
@@ -126,6 +129,7 @@ func startAction(ctx *cli.Context) error {
// stop share & sync workers
workers.Stop()
auto.Stop()
log.Info("shutting down...")
conf.Shutdown()