Add active worker count to buildmanager logs.

This commit is contained in:
Jimmy Zelinskie 2014-12-16 13:37:40 -05:00
parent 37079315d2
commit 33f12c58ba
3 changed files with 10 additions and 2 deletions

View file

@ -9,7 +9,7 @@ from aiowsgi import create_server as create_wsgi_server
from flask import Flask
from threading import Event
from trollius.coroutines import From
from datetime import datetime, timedelta
from datetime import timedelta
from buildman.jobutil.buildjob import BuildJob, BuildJobLoadException
from data.queue import WorkQueue
@ -137,7 +137,7 @@ class BuilderServer(object):
@trollius.coroutine
def _work_checker(self):
while self._current_status == 'running':
logger.debug('Checking for more work')
logger.debug('Checking for more work for %d active workers', self._lifecycle_manager.num_workers())
job_item = self._queue.get(processing_time=self._lifecycle_manager.setup_time())
if job_item is None:
logger.debug('No additional work found. Going to sleep for %s seconds', WORK_CHECK_TIMEOUT)