]> git.ipfire.org Git - oddments/collecty.git/commitdiff
daemon: Rename class and do not load with main module
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 28 Sep 2020 15:30:07 +0000 (15:30 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 28 Sep 2020 15:30:07 +0000 (15:30 +0000)
This avoids the whole daemon code being loaded in clients

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/collecty/__init__.py
src/collecty/daemon.py
src/collectyd

index 9ad7ff0f1093a2cc913a6dd50c2291d9f76d0b4a..55492b28dffad23185f460dce4ace0dc1ebafcd6 100644 (file)
@@ -23,4 +23,3 @@
 from . import logger
 
 from .client import CollectyClient
-from .daemon import Collecty
index fdb0a723e8ed615dfb929a3fcce16d148f94a8b5..22af2b0d103bb43ca88904721fc0db9b78ea9648 100644 (file)
@@ -37,7 +37,7 @@ from .i18n import _
 
 log = logging.getLogger("collecty")
 
-class Collecty(object):
+class Daemon(object):
        # The default interval, when all data is written to disk.
        COMMIT_INTERVAL = 300
 
index 70b849dc2abd9e2f9f429b7341a6afe4f2dc162c..4a7590754571535e414b76b62c8630e1e28b3631 100755 (executable)
@@ -22,7 +22,7 @@
 import optparse
 import sys
 
-import collecty
+import collecty.daemon
 
 # Parse command line options.
 op = optparse.OptionParser(usage="usage: %prog [options]")
@@ -36,7 +36,7 @@ settings = {
 }
 
 # Initialize the application.
-c = collecty.Collecty(**settings)
+c = collecty.daemon.Daemon(**settings)
 
 # Run.
 c.run()