Skip to main content

Push a value into the process queue dictionary (proc_queue_push)

Declaration

size = proc_queue_push(key, value)

Parameters

  • key
    String. The key of the queue.
  • value
    String. The value to push.

Returns

  • size
    Integer. The size of the queue after pushing. If it returns 0, the push failed.

Notes

  • This function is equivalent to proc_queue_push_back.
  • All queues whose names start with "xxtouch." or "1ferver." are preserved and will not be cleared by API operations.
  • The queue size must not exceed 10000. If it exceeds, the earliest values will be discarded (FIFO trimming).
  • Push a value into the process queue dictionary and return the queue size.
  • Empty string cannot be pushed.

Example

local size = proc_queue_push("billnos", "name")
if size ~= 0 then
print("has "..size.." bill(s)")
else
print("failed")
end