예제 #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
파일: test_api.py 프로젝트: shad7/tvrenamer
 def test_clear(self):
     dbapi = cache.dbapi(self.CONF)
     dbapi.clear()
     self.assertTrue(True)
예제 #4
0
파일: test_api.py 프로젝트: shad7/tvrenamer
    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
파일: test_api.py 프로젝트: shad7/tvrenamer
    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
파일: test_api.py 프로젝트: shad7/tvrenamer
 def test_clear(self):
     dbapi = cache.dbapi(self.CONF)
     dbapi.clear()
     self.assertTrue(True)