(**kwargs)
This method is called to action a reaction
This method is called to action a reaction
This method is called to action a reaction
def action(**kwargs):
    ''' This method is called to action a reaction '''
    redata = kwargs['redata']
    jdata = kwargs['jdata']
    logger = kwargs['logger']
    run = True
    # Check for Trigger
    if redata['trigger'] > jdata['failcount']:
        run = False

    # Check for lastrun
    checktime = time.time() - float(redata['lastrun'])
    if checktime < redata['frequency']:
        run = False

    if redata['data']['call_on'] not in jdata['check']['status']:
        run = False

    if run:
        return actionEC2(redata, jdata, logger)
    else:
        return None
def action ( * * kwargs ) : redata = kwargs [ 'redata' ] jdata = kwargs [ 'jdata' ] logger = kwargs [ 'logger' ] run = True # Check for Trigger if redata [ 'trigger' ] > jdata [ 'failcount' ] : run = False # Check for lastrun checktime = time . time ( ) - float ( redata [ 'lastrun' ] ) if checktime < redata [ 'frequency' ] : run = False if redata [ 'data' ] [ 'call_on' ] not in jdata [ 'check' ] [ 'status' ] : run = False if run : return actionEC2 ( redata , jdata , logger ) else : return None