Пример #1
0
        def count(resultList):
            log.debug('tracks', 'counting offline tracks out of %r total',
                len(resultList))
            total = len(resultList)
            online = 0

            for i, (succeeded, result) in enumerate(resultList):
                if result:
                    online += 1
                else:
                    print "track %r offline" % tracks[i]

            print "%d of %d tracks online" % (online, total)

            log.info('online', "%d cache hits of %d lookups",
                dadDB.db.hits, dadDB.db.lookups)
Пример #2
0
        def count(_):
            total = 0
            errors = 0
            online = 0
            for succeeded, result in d.resultList:
                total += 1
                if not succeeded:
                    errors += 1
                else:
                    if result:
                        online += 1

            print "%d of %d audiofiles online" % (online, total)
            if errors:
                print "%d errors" % errors

            log.info('online', "%d cache hits of %d lookups",
                dadDB.db.hits, dadDB.db.lookups)