def returner(ret):
    try:
        with _get_serv(ret, commit=True) as cur:
            sql = '''INSERT INTO `salt_returns`
                    (`fun`, `jid`, `return`, `id`, `success`, `full_ret` )
                    VALUES (%s, %s, %s, %s, %s, %s)'''

            cur.execute(sql, (ret['fun'], ret['jid'],
                              json.dumps(ret['return']),
                              ret['id'],
                              ret.get('success', False),
                              json.dumps(ret)))
    except salt.exceptions.SaltMasterError as exc:
        log.critical(exc)
        log.critical('Could not store return with MySQL returner. MySQL server unavailable.')
Compute slice locations for input labels.
dataset/ETHPy150Open saltstack/salt/salt/returners/mysql.py/returner--crossover with--dataset/ETHPy150Open pydata/pandas/pandas/indexes/base.py/Index.slice_locs