def _calculate_bounds(self):
        """Calculate beginning and end of log events."""
        # get start datetime
        first = self.coll_handle.find_one(None, sort=[("ts", ASCENDING)])
        last = self.coll_handle.find_one(None, sort=[("ts", DESCENDING)])

        self._start = first['ts']
        if self._start.tzinfo is None:
            self._start = self._start.replace(tzinfo=tzutc())

        self._end = last['ts']
        if self._end.tzinfo is None:
            self._end = self._end.replace(tzinfo=tzutc())

        return True
def _calculate_bounds ( self ) : first = self . coll_handle . find_one ( None , sort = [ ( "ts" , ASCENDING ) ] ) last = self . coll_handle . find_one ( None , sort = [ ( "ts" , DESCENDING ) ] ) self . _start = first [ 'ts' ] if self . _start . tzinfo is None : self . _start = self . _start . replace ( tzinfo = tzutc ( ) ) self . _end = last [ 'ts' ] if self . _end . tzinfo is None : self . _end = self . _end . replace ( tzinfo = tzutc ( ) ) return True
Calculate beginning and end of log events.