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
...@@ -199,6 +199,8 @@ def ExecCONFD(options, args): ...@@ -199,6 +199,8 @@ def ExecCONFD(options, args):
"""Main CONFD function, executed with pidfile held """Main CONFD function, executed with pidfile held
""" """
mainloop = daemon.Mainloop()
# confd-level SimpleConfigReader # confd-level SimpleConfigReader
reader = ssconf.SimpleConfigReader() reader = ssconf.SimpleConfigReader()
...@@ -210,7 +212,8 @@ def ExecCONFD(options, args): ...@@ -210,7 +212,8 @@ def ExecCONFD(options, args):
wm = pyinotify.WatchManager() wm = pyinotify.WatchManager()
confd_event_handler = ConfdInotifyEventHandler(wm, reader) confd_event_handler = ConfdInotifyEventHandler(wm, reader)
notifier = AsyncNotifier(wm, confd_event_handler) notifier = AsyncNotifier(wm, confd_event_handler)
asyncore.loop()
mainloop.Run()
def main(): def main():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment