def saveQueryStats(query, facets, found, exectime=0, request=None): stat = QueryStats() stat.userid = _get_userid(request) stat.geoinfo = getcountry_code(_get_ipaddress(request)) stat.query = query stat.facets = facets stat.found = found stat.exectime = exectime stat.save() LOGGER.debug(u'saveQueryStats q={0}.'.format(query))
def saveQueryStats(query, facets, found, exectime=0, request=None): stat = QueryStats() stat.userid = _get_userid(request) stat.geoinfo = getcountry_code(_get_ipaddress(request)) stat.query = query stat.facets = facets stat.found = found stat.exectime = exectime stat.save() LOGGER.debug(u"saveQueryStats q={0}.".format(query))
def saveQueryStats(userid, field, query, found, exectime=0): stat = QueryStats() stat.userid = userid stat.field = field stat.query = query stat.found = found stat.exectime = exectime stat.save() LOGGER.debug('STATS: Query {0}.'.format(query))