Skip to main content

# Push To Queue Front (LCC.kvdb.queue.push_front)

## Signature​

    size, err = LCC.kvdb.queue.push_front(name, value, timeout?)

## Parameters​

- name
  String. Queue name (non-empty, max `256` bytes).
- value
  String. Value to push (must be valid UTF-8).
- timeout
  Number, optional. Request timeout in seconds, default `60`.

## Returns​

- size
  Number. Queue length after the push; `nil` on failure.
- err
  String or `nil`. Error message when the call fails.

## Notes​

> Pushes an item onto the head of the queue.
> Queue names cannot be empty.

## Example​

    local size, err = LCC.kvdb.queue.push_front("pending", "task#1")
    if size then
        LCC.log(1, "Queue size", size)
    end