Skip to content
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.

Commit

Permalink
decrease max age for library caching
Browse files Browse the repository at this point in the history
  • Loading branch information
lackhove committed Jan 2, 2013
1 parent 65eba0d commit 24815ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gmusic-resolver.py
Expand Up @@ -40,6 +40,7 @@

MIN_AVG_SCORE = 0.9
PORT = 8082
MAX_LIB_AGE = 120
api = gmusicapi.Api()

class getHandler(BaseHTTPRequestHandler):
Expand Down Expand Up @@ -125,7 +126,7 @@ def init(request):
t = os.path.getmtime(filename)
age = time.time() - t
logger.debug("cached library age: %d seconds"%age)
if age <= 3600:
if age <= MAX_LIB_AGE:
gmLibrary = pickle.load(open(filename) )
logger.info("loaded library tracks from file")

Expand Down

0 comments on commit 24815ba

Please sign in to comment.