modules_configs='../conf.d/'):
self.first_run = True
self.interval = interval
+ self.default_priority = 60000
# check if plugin directory exists
if not os.path.isdir(modules_path):
debug("cannot find charts directory ", modules_path)
interval = self.interval
# charts updates are twice as frequent as user specified
self.timetable[m.__name__] = [0, interval/2.0]
+
+ # set priorities
+ for m in self.modules:
+ print(m.priority)
+ try:
+ m.priority = int(m.priority)
+ except (AttributeError,ValueError):
+ m.priority = self.default_priority
+
def import_plugin(self, path, name=None):
if name is None:
import random
-update_every=5
+update_every = 5
+priority = 30000
def check():
return True
def create():
- print("CHART python_example.random '' 'A random number' 'random number' random random line 90000 1")
+ print("CHART python_example.random '' 'A random number' 'random number' random random line "+str(priority)+" 1")
print("DIMENSION random1 '' absolute 1 1")
return True