project-stats

keep track of your projects
git clone https://git.ce9e.org/project-stats.git

commit
38b666978df11f1d36bee9443e3df683d0d02b94
parent
e842762d49a680756617e647bb544d34b31f1386
Author
Tobias Bengfort <tobias.bengfort@gmx.net>
Date
2015-12-18 15:42
add rediscache

Diffstat

M project_stats.py 4 ++++
M setup.py 1 +

2 files changed, 5 insertions, 0 deletions


diff --git a/project_stats.py b/project_stats.py

@@ -9,6 +9,7 @@ import subprocess
    9     9 import sys
   10    10 
   11    11 from dateutil import parser as dt
   -1    12 from rediscache import cached, async_cached
   12    13 import aiohttp
   13    14 import yaml
   14    15 
@@ -150,6 +151,7 @@ class ClaimsDict(object):
  150   151         return '\n'.join(lines)
  151   152 
  152   153 
   -1   154 @cached('xi-project-cheesecake', ttl=36000)
  153   155 def cheesecake_index(name):
  154   156     if Cheesecake is not None:
  155   157         # does not seem to be meant to be used as a library
@@ -162,6 +164,7 @@ def cheesecake_index(name):
  162   164         return None
  163   165 
  164   166 
   -1   167 @async_cached('xi-project-bower', ttl=3600)
  165   168 @asyncio.coroutine
  166   169 def get_bower_info(name):
  167   170     process = yield from asyncio.create_subprocess_exec(
@@ -187,6 +190,7 @@ def get_bower_info(name):
  187   190     return json.loads(s)
  188   191 
  189   192 
   -1   193 @async_cached('xi-project', ttl=3600)
  190   194 @asyncio.coroutine
  191   195 def get_json(url, user=None, password=None):
  192   196     assert not (user is None) ^ (password is None)

diff --git a/setup.py b/setup.py

@@ -22,6 +22,7 @@ setup(
   22    22     install_requires=[
   23    23         'python-dateutil',
   24    24         'pyyaml',
   -1    25         'rediscache',
   25    26     ],
   26    27     extras_require={
   27    28         'cheesecake': ['cheesecake'],