From 01e5152d0839f4d087c02bd1e7ee5f0ee502ea22 Mon Sep 17 00:00:00 2001 From: Johannes Findeisen Date: Sat, 15 Jul 2023 08:14:05 +0200 Subject: [PATCH] Added some idea to comments. (0.21.6) --- linspector/monitors.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/linspector/monitors.py b/linspector/monitors.py index 01bff17..41755b4 100644 --- a/linspector/monitors.py +++ b/linspector/monitors.py @@ -12,7 +12,10 @@ from linspector.monitor import Monitor # monitors may must / should be added (and maybe changed) at runtime to add new monitors without # restarting the daemon. maybe add a reset function to each monitor to reset the monitor at runtime -# when changed dynamically. +# when changed dynamically. better: add a hash of the config file of each monitor to each monitor +# object and if it has changed reload the monitor. e.g. delete it from the scheduler and reschedule. +# if a new monitor is added at runtime it needs to be checked manually by running a "reload" command +# to lish which walks thrue all scheduled jobs and when an unknown monitor is found, schedule it. class Monitors: def __init__(self, configuration, environment, log, notifications, services, tasks): self.__configuration = configuration