* BWmon is now event driven and handles reboots. Also got rid of ALL legacy code.
[nodemanager.git] / nm.py
diff --git a/nm.py b/nm.py
index c7beebf..243a782 100644 (file)
--- a/nm.py
+++ b/nm.py
@@ -15,7 +15,7 @@ import tools
 
 from config import Config
 from plcapi import PLCAPI 
-
+import random
 
 savedargv = sys.argv[:]
 
@@ -55,7 +55,7 @@ def run():
             print "Warning while writing PID file:", err
 
         # Load and start modules
-        for module in ['net', 'proper', 'conf_files', 'sm']:
+        for module in ['net', 'proper', 'conf_files', 'sm', 'bwmon']:
             try:
                 m = __import__(module)
                 m.start(options, config)
@@ -75,7 +75,7 @@ def run():
         while True:
             try: GetSlivers(plc)
             except: logger.log_exc()
-            time.sleep(options.period)
+            time.sleep(options.period + random.randrange(0,301))
     except: logger.log_exc()