Insert minion return data into the sqlite3 database

def returner(ret):
    '''
    Insert minion return data into the sqlite3 database
    '''
    log.debug('sqlite3 returner <returner> called with data: %s', ret)
    conn = _get_conn(ret)
    cur = conn.cursor()
    sql = '''INSERT INTO salt_returns
             (fun, jid, id, fun_args, date, full_ret, success)
             VALUES (:fun, :jid, :id, :fun_args, :date, :full_ret, :success)'''
    cur.execute(sql,
                {'fun': ret['fun'],
                 'jid': ret['jid'],
                 'id': ret['id'],
                 'fun_args': six.text_type(ret['fun_args']) if ret.get('fun_args') else None,
                 'date': six.text_type(datetime.datetime.now()),
                 'full_ret': salt.utils.json.dumps(ret['return']),
                 'success': ret.get('success', '')})
    _close_conn(conn)