示例#1
0
文件: cache.py 项目: shad7/tvrenamer
    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)
示例#2
0
文件: cache.py 项目: shad7/tvrenamer
    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)
示例#3
0
 def test_clear(self):
     dbapi = cache.dbapi(self.CONF)
     dbapi.clear()
     self.assertTrue(True)
示例#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)
示例#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)
示例#6
0
 def test_clear(self):
     dbapi = cache.dbapi(self.CONF)
     dbapi.clear()
     self.assertTrue(True)