]> git.ipfire.org Git - oddments/collecty.git/commitdiff
daemon: Add plugins to scheduler when the daemon launches
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 20 Sep 2020 14:23:19 +0000 (14:23 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 20 Sep 2020 14:23:19 +0000 (14:23 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/collecty/daemon.py

index 1267e4e6b8a7ca9cdbd65fda2d6e601f552180c5..8263291f2e58a38b557dc6c58d8981335d1a5890 100644 (file)
@@ -82,9 +82,6 @@ class Collecty(object):
 
                self.plugins.append(plugin)
 
-               # Schedule the plugin to collect
-               self._schedule_plugin(plugin)
-
        @property
        def templates(self):
                for plugin in self.plugins:
@@ -142,6 +139,10 @@ class Collecty(object):
                # Start the bus
                self.bus.start()
 
+               # Add all plugins to the scheduler
+               for plugin in self.plugins:
+                       self._schedule_plugin(plugin)
+
                # Run the scheduler
                try:
                        self.scheduler.run()