def get_jobs_summary(**filter_data):
 jobs = get_jobs(**filter_data)
 ids = [job['id'] for job in jobs]
 all_status_counts = models.Job.objects.get_status_counts(ids)
 for job in jobs:
  job['status_counts'] = all_status_counts[job['id']]
 return rpc_utils.prepare_for_serialization(jobs)

def get_jobs_summary ( ** filter_data ) : jobs = get_jobs ( ** filter_data ) ids = [ job [ 'id' ] for job in jobs ] all_status_counts = models . Job . objects . get_status_counts ( ids ) for job in jobs : job [ 'status_counts' ] = all_status_counts [ job [ 'id' ] ] return rpc_utils . prepare_for_serialization ( jobs )
like get_jobs() .