From 2d034d72723325c6b2f0c220bee0d300f458614d Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Tue, 25 Nov 2025 15:01:11 -0700 Subject: [PATCH] Adjust timing, settings --- main.py | 7 ++----- secrets.py.example | 7 +++++++ 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 secrets.py.example diff --git a/main.py b/main.py index 362ebc1..3a15720 100644 --- a/main.py +++ b/main.py @@ -9,11 +9,7 @@ import threading import requests from inotify_simple import INotify, flags -WATCH_PATHS = [ - '/tmp/watch-test', -] - -SCAN_DELAY_SECONDS = 5 +SCAN_DELAY_SECONDS = 10 timer = None @@ -50,6 +46,7 @@ def main(): logging.debug(f"Event: {event!r}") if timer: timer.cancel() + logging.info('Debounce cancelled timer.') timer = threading.Timer(SCAN_DELAY_SECONDS, trigger_scan) timer.start() logging.info(f"Modification detected. Triggering scan in {SCAN_DELAY_SECONDS} seconds.") diff --git a/secrets.py.example b/secrets.py.example new file mode 100644 index 0000000..5d96f2b --- /dev/null +++ b/secrets.py.example @@ -0,0 +1,7 @@ +IMMICH_API_KEY = '' + +LIBRARY_UUID = '' + +WATCH_PATHS = [ + '/mnt/example/path', +]