From: Michael Tremer Date: Mon, 28 Sep 2020 15:30:07 +0000 (+0000) Subject: daemon: Rename class and do not load with main module X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecb9b40104d782f57a82aab49b0f4480be655391;p=collecty.git daemon: Rename class and do not load with main module This avoids the whole daemon code being loaded in clients Signed-off-by: Michael Tremer --- diff --git a/src/collecty/__init__.py b/src/collecty/__init__.py index 9ad7ff0..55492b2 100644 --- a/src/collecty/__init__.py +++ b/src/collecty/__init__.py @@ -23,4 +23,3 @@ from . import logger from .client import CollectyClient -from .daemon import Collecty diff --git a/src/collecty/daemon.py b/src/collecty/daemon.py index fdb0a72..22af2b0 100644 --- a/src/collecty/daemon.py +++ b/src/collecty/daemon.py @@ -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 diff --git a/src/collectyd b/src/collectyd index 70b849d..4a75907 100755 --- a/src/collectyd +++ b/src/collectyd @@ -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()