def _get_metrics_jobs(date=None):
 if (not date):
  date = UpdateCount.objects.aggregate(max=Max('date'))['max']
 stats = {'addon_total_updatepings': (lambda : UpdateCount.objects.filter(date=date).aggregate(sum=Sum('count'))['sum']), 'collector_updatepings': (lambda : UpdateCount.objects.get(addon=settings.ADDON_COLLECTOR_ID, date=date).count)}
 return stats

def _get_metrics_jobs ( date = None ) : if ( not date ) : date = UpdateCount . objects . aggregate ( max = Max ( 'date' ) ) [ 'max' ] stats = { 'addon_total_updatepings' : ( lambda : UpdateCount . objects . filter ( date = date ) . aggregate ( sum = Sum ( 'count' ) ) [ 'sum' ] ) , 'collector_updatepings' : ( lambda : UpdateCount . objects . get ( addon = settings . ADDON_COLLECTOR_ID , date = date ) . count ) } return stats
return a dictionary of statistics queries .