Added some log lines

This commit is contained in:
Erik Thuning 2024-06-13 13:44:45 +02:00
parent 0f001ed0ab
commit be2e4305f4

@ -48,6 +48,8 @@ class Watcher(PatternMatchingEventHandler):
sentinel = basedir / 'arec-watcher-notified'
if sentinel.exists():
self.logger.debug('Ignored %s due to sentinel file present',
basedir)
continue
self.logger.info('Picked up %s', basedir)
@ -56,6 +58,9 @@ class Watcher(PatternMatchingEventHandler):
data={'upload_dir': basedir})
result.raise_for_status()
sentinel.touch(exist_ok=False)
self.logger.info('Successfully notified %s about %s',
self.notify:url,
basedir)
except requests.HTTPError as e:
self.logger.error('Failed to notify %s about %s',
self.notify_url,