

def event_return(events):
    "\n    Return event to mysql server\n\n    Requires that configuration be enabled via 'event_return'\n    option in master config.\n    "
    with _get_serv(events, commit=True) as cur:
        for event in data:
            tag = event.get('tag', '')
            data = event.get('data', '')
            sql = 'INSERT INTO `salt_events` (`tag`, `data`, `master_id` )\n                     VALUES (%s, %s, %s)'
            cur.execute(sql, (tag, json.dumps(data), __opts__['id']))

dataset/ETHPy150Open saltstack/salt/salt/returners/mysql.py event_return/VarMisuse@29/80 `events`->`data`