def delete(queue, items):
    '''
    Delete an item or items from a queue
    '''
    with _conn(commit=True) as cur:
        if isinstance(items, dict):
            cmd = str("""DELETE FROM {0} WHERE data = '{1}'""").format(  # future lint: disable=blacklisted-function
                queue,
                salt.utils.json.dumps(items))
            log.debug('SQL Query: %s', cmd)
            cur.execute(cmd)
            return True
        if isinstance(items, list):
            items = [(salt.utils.json.dumps(el),) for el in items]
            cmd = 'DELETE FROM {0} WHERE data = %s'.format(queue)
            log.debug('SQL Query: %s', cmd)
            cur.executemany(cmd, items)
    return True
Delete an item or items from a queue