(redata, jdata, logger)
Actually perform the stathat call
Actually perform the stathat call
Actually perform the stathat call
def callStathat(redata, jdata, logger):
    ''' Actually perform the stathat call '''
    if redata['data']['stat_type'] == "count":
        stathat.ez_count(
            redata['data']['ez_key'],
            redata['data']['stat_name'], redata['data']['value'])
        line = "stathat: Sent stathat counter for monitor %s" % jdata['cid']
        logger.info(line)
    elif redata['data']['stat_type'] == "value":
        stathat.ez_value(
            redata['data']['ez_key'],
            redata['data']['stat_name'], redata['data']['value'])
        line = "stathat: Sent stathat value for monitor %s" % jdata['cid']
        logger.info(line)
    else:
        line = "stathat: Unknown stat type defined in reaction %s" % redata[
            'id']
        logger.error(line)
def callStathat ( redata , jdata , logger ) : if redata [ 'data' ] [ 'stat_type' ] == "count" : stathat . ez_count ( redata [ 'data' ] [ 'ez_key' ] , redata [ 'data' ] [ 'stat_name' ] , redata [ 'data' ] [ 'value' ] ) line = "stathat: Sent stathat counter for monitor %s" % jdata [ 'cid' ] logger . info ( line ) elif redata [ 'data' ] [ 'stat_type' ] == "value" : stathat . ez_value ( redata [ 'data' ] [ 'ez_key' ] , redata [ 'data' ] [ 'stat_name' ] , redata [ 'data' ] [ 'value' ] ) line = "stathat: Sent stathat value for monitor %s" % jdata [ 'cid' ] logger . info ( line ) else : line = "stathat: Unknown stat type defined in reaction %s" % redata [ 'id' ] logger . error ( line )