def process(self, data): """Process the results from episode processing. :param list data: result instances """ for res in data: try: cache.dbapi().save(res) except Exception: LOG.exception('failed to cache result: %s', res.status)
def test_clear(self): dbapi = cache.dbapi(self.CONF) dbapi.clear() self.assertTrue(True)
def setUp(self): super(SAApiTestCase, self).setUp() dbfile = os.path.join(tempfile.mkdtemp(), 'cache.json') self.CONF.set_override('dbfile', dbfile, 'cache') self.dbconn = cache.dbapi(self.CONF)