Add a 'started' hook for the Magic Folder Uploader. 2438.fix-tests.1
authorDaira Hopwood <daira@jacaranda.org>
Thu, 3 Sep 2015 14:49:34 +0000 (15:49 +0100)
committerDaira Hopwood <daira@jacaranda.org>
Thu, 3 Sep 2015 14:53:53 +0000 (15:53 +0100)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
src/allmydata/frontends/magic_folder.py

index c78a086304c1d5d49ce8a82709074c8753f4815e..6572e1d3b404b0ebe0a5a6b33dcd6162ba5200ba 100644 (file)
@@ -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):