better logging, stem the worker memory leaks and fix up the start script
This commit is contained in:
parent
fa4448174f
commit
635349b1f0
@ -76,6 +76,8 @@ You can add as many deployments as you like.
|
|||||||
|
|
||||||
#### Starting the Worker
|
#### 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.
|
`./worker/start_workers.py` will spawn a worker.py process for each deployment defined. Each worker will consume from a single Rabbit queue.
|
||||||
|
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ class NovaConsumer(kombu.mixins.ConsumerMixin):
|
|||||||
if raw:
|
if raw:
|
||||||
self.processed += 1
|
self.processed += 1
|
||||||
|
|
||||||
self._check_memory()
|
self._check_memory()
|
||||||
|
|
||||||
def _check_memory(self):
|
def _check_memory(self):
|
||||||
if not self.pmi:
|
if not self.pmi:
|
||||||
@ -89,7 +89,7 @@ class NovaConsumer(kombu.mixins.ConsumerMixin):
|
|||||||
check = self.last_time is None
|
check = self.last_time is None
|
||||||
if self.last_time:
|
if self.last_time:
|
||||||
diff = utc - self.last_time
|
diff = utc - self.last_time
|
||||||
if diff.seconds > 30:
|
if diff.seconds > 30:
|
||||||
check = True
|
check = True
|
||||||
if check:
|
if check:
|
||||||
self.last_time = utc
|
self.last_time = utc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user