Pop From Queue Front (LCC.kvdb.queue.pop_front)
Signature
value, err = LCC.kvdb.queue.pop_front(name, timeout?)
Parameters
- name
String. Queue name (non-empty, max256bytes). - timeout
Number, optional. Request timeout in seconds, default60.
Returns
- value
String. The item removed from the head;nilwhen the queue is empty. - err
String ornil. Returns'not found'when the queue is empty or missing.
Notes
Removes and returns the first element from the queue.
Returnsnil, 'not found'when the queue is empty.
Example
local value, err = LCC.kvdb.queue.pop_front("pending")
if value then
print("Processing", value)
end