Count Value Occurrences (LCC.kvdb.queue.count)
Signature
count, err = LCC.kvdb.queue.count(name, value, timeout?)
Parameters
- name
String. Queue name (non-empty, max256bytes). - value
String. Value to count within the queue (must be valid UTF-8). - timeout
Number, optional. Request timeout in seconds, default60.
Returns
- count
Number. Occurrence count;nilon failure. - err
String ornil. Error description when the call fails.
Notes
Counts how many times the given value appears in the queue (server-side).
Useful for rate limiting or queue monitoring.
Example
local cnt, err = LCC.kvdb.queue.count("pending", "timeout")
if cnt then
print("Tasks pending retry:", cnt)
end