Stats page issue 288

Do we track any other data that we might want to display on this page?
I can make a utility function in qiita_db if that would be more desirable

On Mon, Nov 3, 2014 at 9:56 AM, Antonio Gonzalez <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()
>
> I thought the idea was not to do actual sql calls from here but have
> qiita_db do them, right? In other words, should these lines be in qiita_db?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/biocore/qiita/pull/555/files#r19746237>.
>