Add return value for collect_usage()
When some exception happened in collect_usage() when doing collection for tenant in either time window, correct exception message should be logged, and tenant collection should not be considered successful. This patch mainly changes the log message. Change-Id: I2c6784708c32030b0d32bb0696b194a0be0f8a91
This commit is contained in:
@@ -129,9 +129,8 @@ class CollectorService(service.Service):
|
||||
db_project = db_api.project_add(project, last_collect)
|
||||
start = db_project.last_collected
|
||||
|
||||
self.collector.collect_usage(project, start, end)
|
||||
|
||||
count = count + 1
|
||||
if self.collector.collect_usage(project, start, end):
|
||||
count = count + 1
|
||||
except Exception:
|
||||
LOG.warning('Get lock failed. Process: %s' % self.identifier)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user