Ejemplo n.º 1
0
 def stats_for_last_master_step(self, request):
     record_iterator = (convert_record_from_ndb(r)
                        for r in controller.get_step_master_last_iterator(
                            request.master, request.step, request.limit))
     stat_ndb = controller.get_step_records_internal(
         '/'.join([request.master, request.step]), datetime.now(),
         datetime.now(), record_iterator)
     stat_obj = statistic_from_ndb(stat_ndb)
     stat_obj.step = '%s/%s' % (request.master, request.step)
     stat_obj.generated = datetime.now()
     stat_obj.aggregation_range = float(request.limit)
     stat_obj.aggregate_type = AggregateType.BUILDNUM
     return stat_obj
Ejemplo n.º 2
0
 def stats_for_last_master_step(self, request):
   record_iterator = (convert_record_from_ndb(r) for r in
       controller.get_step_master_last_iterator(request.master,
         request.step, request.limit))
   stat_ndb = controller.get_step_records_internal('/'.join(
     [request.master, request.step]), datetime.now(), datetime.now(),
     record_iterator)
   stat_obj = statistic_from_ndb(stat_ndb)
   stat_obj.step = '%s/%s' % (request.master, request.step)
   stat_obj.generated = datetime.now()
   stat_obj.aggregation_range = float(request.limit)
   stat_obj.aggregate_type = AggregateType.BUILDNUM
   return stat_obj
Ejemplo n.º 3
0
 def list_last_for_master_step(self, request):
     return RecordList(step_records=list(
         convert_record_from_ndb(r)
         for r in controller.get_step_master_last_iterator(
             request.master, request.step, request.limit)))
Ejemplo n.º 4
0
 def list_last_for_master_step(self, request):
   return RecordList(step_records=list(
     convert_record_from_ndb(r) for r in
     controller.get_step_master_last_iterator(request.master,
       request.step, request.limit)))