Esempio n. 1
0
def doFile(masterCache, dr, files):

    i = 1
    for fileName in files:
        assert (isinstance(masterCache, MemoryCache.MemoryCache))
        print "Loading %d of %d: %s" % (i, len(files), fileName)
        i += 1
        newCache = iRacingUtils.loadCacheFromPickle(dr + fileName)
        print "Merging..."
        masterCache.mergeWith(newCache)
Esempio n. 2
0
def doFile(masterCache, dr, files):
    
    i = 1
    for fileName in files:
        assert(isinstance(masterCache, MemoryCache.MemoryCache))
        print "Loading %d of %d: %s" % (i, len(files), fileName)
        i += 1
        newCache = iRacingUtils.loadCacheFromPickle(dr+fileName)
        print "Merging..."
        masterCache.mergeWith(newCache)
Esempio n. 3
0
import logging
import logging.config
import MemoryCache
import iRacingUtils

logging.config.fileConfig(iRacingUtils.getConfigFileName())

cache = iRacingUtils.loadCacheFromPickle()

if cache is None:
    logging.getLogger().info("Cached data not available, exiting")
    exit(1)

totalraces = 0
totalcounted = 0

for week in range(0,10):
    unofficial = 0
    noresults = 0
    nolaps = 0

    races = cache.getSeasonRaces(420, week)  
    totalraces += len(races)    
    for race in races:
        if not race.isofficial:
            unofficial += 1
            continue
        
        results = race.getResults()    
        
        if results  == None:
Esempio n. 4
0
import logging
import logging.config
import MemoryCache
import iRacingUtils

logging.config.fileConfig(iRacingUtils.getConfigFileName())

cache = iRacingUtils.loadCacheFromPickle()

if cache is None:
    logging.getLogger().info("Cached data not available, exiting")
    exit(1)

totalraces = 0
totalcounted = 0

for week in range(0, 10):
    unofficial = 0
    noresults = 0
    nolaps = 0

    races = cache.getSeasonRaces(420, week)
    totalraces += len(races)
    for race in races:
        if not race.isofficial:
            unofficial += 1
            continue

        results = race.getResults()

        if results == None: