better logging, stem the worker memory leaks and fix up the start script

This commit is contained in:
Sandy Walsh 2012-11-07 10:04:40 -04:00
parent fa4448174f
commit 635349b1f0
2 changed files with 4 additions and 2 deletions

View File

@ -76,6 +76,8 @@ You can add as many deployments as you like.
#### Starting the Worker
Note: the worker now uses librabbitmq, be sure to install that first.
`./worker/start_workers.py` will spawn a worker.py process for each deployment defined. Each worker will consume from a single Rabbit queue.

View File

@ -77,7 +77,7 @@ class NovaConsumer(kombu.mixins.ConsumerMixin):
if raw:
self.processed += 1
self._check_memory()
self._check_memory()
def _check_memory(self):
if not self.pmi:
@ -89,7 +89,7 @@ class NovaConsumer(kombu.mixins.ConsumerMixin):
check = self.last_time is None
if self.last_time:
diff = utc - self.last_time
if diff.seconds > 30:
if diff.seconds > 30:
check = True
if check:
self.last_time = utc