Add a RepositoryActionCount table so we can use it (instead of LogEntry) when scoring repo search results

This commit is contained in:
Joseph Schorr 2015-04-13 13:31:07 -04:00
parent 703f48f194
commit 3f1e8f3c27
8 changed files with 137 additions and 19 deletions

View file

@ -16,6 +16,8 @@ from data import model
from data.model import oauth
from app import app, storage as store
from workers import repositoryactioncounter
logger = logging.getLogger(__name__)
@ -582,6 +584,9 @@ def populate_database():
'trigger_id': trigger.uuid, 'config': json.loads(trigger.config),
'service': trigger.service.name})
while repositoryactioncounter.count_repository_actions():
pass
if __name__ == '__main__':
log_level = getattr(logging, app.config['LOGGING_LEVEL'])
logging.basicConfig(level=log_level)