'Delete expired meta-data.'

def cleanup(self):

    session = self.ResultSession()
    expires = self.expires
    now = self.app.now()
    with session_cleanup(session):
        session.query(Task).filter((Task.date_done < (now - expires))).delete()
        session.query(TaskSet).filter((TaskSet.date_done < (now - expires))).delete()
        session.commit()
