Commit 3ea89c331618aaac8c52aa021728512818ac06c9

  • avatar
  • arvind
  • Fri Jan 24 16:05:23 IST 2014
Contenders for least active hours are now added to the report.
query.py
(5 / 2)
  
7070 slots['{0}-{1}'.format(date1.strftime('%H'), date2.strftime('%H'))] = result.filter(self.t.lt.calldate.between(date1, date2)).count()
7171
7272 maxLoad = max(slots, key = lambda x: slots.get(x) )
73 minLoad = min(slots, key = lambda x: slots.get(x) )
74 return {"maxLoad": maxLoad, "maxCalls": slots[maxLoad], "minLoad": minLoad}
73 minLoad = []
74 for slot in slots:
75 if min(slots, slots[slot]) == 0:
76 minLoad.append(slot)
77 return {"maxLoad": maxLoad, "maxCalls": slots[maxLoad], "minLoad": repr(minLoad)}