(item)
return True
This will send a manual action to the sink
This will send a manual action to the sink
This will send a manual action to the sink
def sendtoSink(item):
    ''' This will send a manual action to the sink '''
    if "encrypted" in item:
        if item['encrypted'] is True:
            item['data'] = crypto.encrypt(json.dumps(item['data']))
    msg = item
    msg['time_tracking'] = {
        'control': time.time(),
        'ez_key': config['stathat_key'],
        'env': config['envname']}
    msg['zone'] = "Web API"
    jdata = json.dumps(msg)
    zsend.send(jdata)
    return True
def sendtoSink ( item ) : if "encrypted" in item : if item [ 'encrypted' ] is True : item [ 'data' ] = crypto . encrypt ( json . dumps ( item [ 'data' ] ) ) msg = item msg [ 'time_tracking' ] = { 'control' : time . time ( ) , 'ez_key' : config [ 'stathat_key' ] , 'env' : config [ 'envname' ] } msg [ 'zone' ] = "Web API" jdata = json . dumps ( msg ) zsend . send ( jdata ) return True