Exemple #1
0
    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)
Exemple #2
0
    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)
Exemple #3
0
 def test_clear(self):
     dbapi = cache.dbapi(self.CONF)
     dbapi.clear()
     self.assertTrue(True)
Exemple #4
0
    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)
Exemple #5
0
    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)
Exemple #6
0
 def test_clear(self):
     dbapi = cache.dbapi(self.CONF)
     dbapi.clear()
     self.assertTrue(True)