Poll gerrit only for projects that have it
Currently Stackalytics polls gerrit for all projects, even for external non-OpenStack. With this patch communication with gerrit is optimized and only hosted projects are queried. The patch should decrease number of gerrit communication errors. Change-Id: I738cac6eb92615c5fe5d9e1bf1b878197d78876f
This commit is contained in:
@@ -131,6 +131,9 @@ def _process_repo(repo, runtime_storage_inst, record_processor_inst,
|
||||
last_id = vcs_inst.get_last_id(branch)
|
||||
runtime_storage_inst.set_by_key(vcs_key, last_id)
|
||||
|
||||
if 'has_gerrit' not in repo:
|
||||
continue # do not poll reviews for those that do not have them
|
||||
|
||||
LOG.info('Processing reviews for repo: %s, branch: %s', uri, branch)
|
||||
|
||||
rcs_key = 'rcs:%s:%s' % (quoted_uri, branch)
|
||||
|
||||
Reference in New Issue
Block a user