Skip to content
Snippets Groups Projects
Commit 6b20826c authored by ale's avatar ale
Browse files

return quickly if there is nothing to aggregate

parent 7e8d9545
No related branches found
No related tags found
No related merge requests found
...@@ -51,6 +51,10 @@ class Accounting(object): ...@@ -51,6 +51,10 @@ class Accounting(object):
aggr_day[attr] += conn_info[attr] aggr_day[attr] += conn_info[attr]
pipe.execute() pipe.execute()
# Short return if there's nothing to do.
if not aggr:
return
# Aggregate values on the master server. # Aggregate values on the master server.
days = aggr.keys() days = aggr.keys()
aggr_key = 'aggr:%s' % cn aggr_key = 'aggr:%s' % cn
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment