Added dynamic loading of tasks and services, refactoring and fixes.

This commit is contained in:
Johannes Findeisen 2022-09-27 07:00:17 +02:00
commit 8d9ec5c73b
18 changed files with 51 additions and 236 deletions

View file

@ -38,7 +38,7 @@ logger = getLogger('linspector')
# when changed dynamically.
class Monitors:
def __init__(self, configuration, environment, notifications, services):
def __init__(self, configuration, environment, notifications, services, tasks):
self.__configuration = configuration
self.__environment = environment
self.__monitors = {}
@ -60,7 +60,7 @@ class Monitors:
# they else refer to the same object.
self.__monitors[identifier] = Monitor(configuration, environment, identifier,
copy.deepcopy(monitor_configuration),
notifications, services)
notifications, services, tasks)
def get_monitors(self):
return self.__monitors