Stats page issue 288

Do we track any other data that we might want to display on this page?
ok

On Mon, Nov 3, 2014 at 10:01 AM, Joshua Shorenstein <
notifications@github.com> wrote:

> In qiita_pet/handlers/stats.py:
>
> > +from qiita_ware import r_server
> > +from qiita_db.sql_connection import SQLConnectionHandler
> > +from qiita_db.util import get_count
> > +from qiita_db.study import Study
> > +from .base_handlers import BaseHandler
> > +
> > +
> > +class StatsHandler(BaseHandler):
> > +    def _get_stats(self, callback):
> > +        # check if the key exists in redis
> > +        lats = r_server.lrange('stats:sample_lats', 0, -1)
> > +        longs = r_server.lrange('stats:sample_longs', 0, -1)
> > +        if not (lats or longs):
> > +            # if we don't have them, then fetch from disk and add to the
> > +            # redis server with a 1-hour expiration
> > +            conn = SQLConnectionHandler()
>
> Yeah, no SQL should leak out of qiita_db.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/biocore/qiita/pull/555/files#r19746631>.
>