From: Daira Hopwood Date: Thu, 3 Sep 2015 14:49:34 +0000 (+0100) Subject: Add a 'started' hook for the Magic Folder Uploader. X-Git-Url: https://git.rkrishnan.org/pf/content/en/service/using.html?a=commitdiff_plain;h=3f165dcc208b10a4f30a1514adccb90f2c544fcc;p=tahoe-lafs%2Ftahoe-lafs.git Add a 'started' hook for the Magic Folder Uploader. Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/frontends/magic_folder.py b/src/allmydata/frontends/magic_folder.py index c78a0863..6572e1d3 100644 --- a/src/allmydata/frontends/magic_folder.py +++ b/src/allmydata/frontends/magic_folder.py @@ -95,7 +95,7 @@ class QueueMixin(HookMixin): self._local_path = to_filepath(local_path_u) self._db = db self._name = name - self._hooks = {'processed': None} + self._hooks = {'processed': None, 'started': None} if not self._local_path.exists(): raise AssertionError("The '[magic_folder] local.directory' parameter was %s " @@ -184,6 +184,7 @@ class Uploader(QueueMixin): def start_monitoring(self): d = self._notifier.startReading() self._count('dirs_monitored') + d.addBoth(self._call_hook, 'started') return d def stop(self):