Add an item or items to a queue

    CLI Example:

    .. code-block:: bash

        salt-run queue.insert myqueue myitem
        salt-run queue.insert myqueue "['item1', 'item2', 'item3']"
        salt-run queue.insert myqueue myitem backend=sqlite
        salt-run queue.insert myqueue "['item1', 'item2', 'item3']" backend=sqlite

def insert(queue, items, backend='sqlite'):
    '''
    Add an item or items to a queue

    CLI Example:

    .. code-block:: bash

        salt-run queue.insert myqueue myitem
        salt-run queue.insert myqueue "['item1', 'item2', 'item3']"
        salt-run queue.insert myqueue myitem backend=sqlite
        salt-run queue.insert myqueue "['item1', 'item2', 'item3']" backend=sqlite
    '''
    queue_funcs = salt.loader.queues(__opts__)
    cmd = '{0}.insert'.format(backend)
    if cmd not in queue_funcs:
        raise SaltInvocationError('Function "{0}" is not available'.format(cmd))
    ret = queue_funcs[cmd](items=items, queue=queue)
    return ret