Remove unnecessary NodePoolBuilder thread

Originally, the thread started with the NodePoolBuilder.runForever()
method did all the work of the builder. This functionality is moving
to inside the BuildScheduler. As a result, the thread used for
NodePoolBuilder is no longer necessary. The intention is to (eventually)
totally decouple these classes so that NodePoolBuilder is used only to
start and stop the builder thread of execution. It's run() method is
renamed to start() to better reflect its purpose.

Change-Id: Ief00e4a06bd919e99dbff07f7238ac51035b06ef
This commit is contained in:
David Shrewsbury
2016-08-17 15:46:13 -04:00
parent d2e2babf3e
commit 04c81431aa
5 changed files with 94 additions and 82 deletions

View File

@@ -16,7 +16,6 @@ import argparse
import extras
import signal
import sys
import threading
import daemon
@@ -62,9 +61,7 @@ class NodePoolBuilderApp(nodepool.cmd.NodepoolApp):
self.args.upload_workers)
signal.signal(signal.SIGINT, self.sigint_handler)
nb_thread = threading.Thread(target=self.nb.run)
nb_thread.start()
self.nb.start()
while True:
signal.pause()