Skip to contents

Process queued payloads

Usage

payload_queue_process(processor, max_items = 10)

Arguments

processor

A function that accepts (path, payload, meta) and processes it. Should return TRUE on success, FALSE on failure.

max_items

Maximum number of items to process (default 10)

Value

A list with processing results

Examples

if (interactive()) {
  # Process queued items
  result <- payload_queue_process(function(path, payload, meta) {
    cat("Processing payload for", path, "\n")
    # Your processing logic here
    TRUE  # Return TRUE on success
  })
  cat("Processed:", result$processed, "items\n")
}