Adjust timing, settings

This commit is contained in:
2025-11-25 15:01:11 -07:00
parent 8c71e3cdfc
commit 2d034d7272
2 changed files with 9 additions and 5 deletions

View File

@@ -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.")