Skip to content
Snippets Groups Projects
Commit f91c7223 authored by Guido Trotter's avatar Guido Trotter
Browse files

Convert ganeti-confd to Mainloop


Now that mainloop is asyncore-enabled we can easily do that.

Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 112d240d
No related branches found
No related tags found
No related merge requests found
......@@ -199,6 +199,8 @@ def ExecCONFD(options, args):
"""Main CONFD function, executed with pidfile held
"""
mainloop = daemon.Mainloop()
# confd-level SimpleConfigReader
reader = ssconf.SimpleConfigReader()
......@@ -210,7 +212,8 @@ def ExecCONFD(options, args):
wm = pyinotify.WatchManager()
confd_event_handler = ConfdInotifyEventHandler(wm, reader)
notifier = AsyncNotifier(wm, confd_event_handler)
asyncore.loop()
mainloop.Run()
def main():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment