Пример #1
0
    def setupPointsByDay(self, points):

        for meter, start, end, values in points:
            daterange = datespan(
                localisodate(start),
                localisodate(end)+datetime.timedelta(days=1)
                )
            for date, value in zip(daterange, values):
                self.helper.fillMeasurementPoint(str(asUtc(date))[:-6],meter,value)
Пример #2
0
 def __init__(self, *args, **kwargs):
     self.uri = kwargs.pop('uri') if 'uri' in kwargs else None
     self.lastcommit = kwargs.pop('lastcommit') if 'lastcommit' in kwargs else None
     if self.lastcommit:
         self.lastcommit = localisodate(self.lastcommit).date() + datetime.timedelta(days=1)
     self.curveProvider = kwargs.pop('curveProvider') if 'curveProvider' in kwargs else None
     super(ProductionMeter, self).__init__(*args, **kwargs)