Commit 6b20826c authored by ale's avatar ale
Browse files

return quickly if there is nothing to aggregate

parent 7e8d9545
......@@ -51,6 +51,10 @@ class Accounting(object):
aggr_day[attr] += conn_info[attr]
pipe.execute()
# Short return if there's nothing to do.
if not aggr:
return
# Aggregate values on the master server.
days = aggr.keys()
aggr_key = 'aggr:%s' % cn
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment