call it a Daemon, cuz it is

This commit is contained in:
Jason Kölker 2011-06-13 12:21:35 -05:00
parent 96251f9e77
commit aa4433af4c
2 changed files with 4 additions and 4 deletions

View File

@ -60,7 +60,7 @@ if __name__ == '__main__':
conf, app = config.load_paste_app('glance-scrubber', options, args)
wakeup_time = int(conf.get('wakeup_time', 300))
server = scrubber.Server(wakeup_time)
server = scrubber.Daemon(wakeup_time)
server.start(app)
server.wait()
except RuntimeError, e:

View File

@ -29,9 +29,9 @@ from glance.registry.db import api as db_api
logger = logging.getLogger('glance.store.scrubber')
class Server(object):
class Daemon(object):
def __init__(self, wakeup_time=300, threads=1000):
logger.info("Starting Server: " +
logger.info("Starting Daemon: " +
"wakeup_time=%s threads=%s" % (wakeup_time, threads))
self.wakeup_time = wakeup_time
self.event = eventlet.event.Event()
@ -44,7 +44,7 @@ class Server(object):
try:
self.event.wait()
except KeyboardInterrupt:
logger.info("Server Shutdown on KeyboardInterrupt")
logger.info("Daemon Shutdown on KeyboardInterrupt")
def _run(self, application):
logger.debug("Runing application")