def METHOD_NAME(self, event):
    """save data to database then prune old records as needed"""
    now = int(time.time() + 0.5)
    delta = now - event.record['dateTime']
    if delta > event.record['interval'] * 60:
        log.debug("Skipping record: time difference %s too big" % delta)
        return
    if self.last_ts is not None:
        self.save_data(self.get_data(now, self.last_ts))
    self.last_ts = now
    if self.max_age is not None:
        self.prune_data(now - self.max_age)