ramdb/docs/core/processQueue.md
Jacob Schmidt 8c0e8144e5 docs: Update documentation links and function references
This commit updates the documentation to reflect the current function names and link structure. Specifically, it addresses the following:

*   Corrected internal links within the documentation to point to the correct markdown files (e.g., `hashDelete.md` instead of `hashDelete`).
*   Updated related function references to reflect the current function names and include missing functions.
*   Removed outdated function references.
*   Added `ramdb_db_fnc_scheduler` to related functions where appropriate.
*   Updated the links section to use the correct markdown file names.
2025-03-22 16:53:30 -05:00

1.8 KiB

title, icon, excerpt
title icon excerpt
ArmaRAMDb - Process Queue mdi:file-text-outline Processes a queue of tasks to be executed.

ramdb_db_fnc_processQueue

Description

Processes the queue of pending database tasks sequentially. This function executes each task in the queue one by one, handling various database operations based on the task type. It continues processing until the queue is empty.

Syntax

[] spawn ramdb_db_fnc_processQueue

Parameters

None. This function does not require any parameters.

Return Value

None. The function processes tasks in the queue and updates the processing state.

Examples

Start processing the queue manually:

[] spawn ramdb_db_fnc_processQueue;

Trigger queue processing from a client:

[] remoteExec ["ramdb_db_fnc_processQueue", 2, false];

Notes

  • Sets GVAR(isProcessing) to true while running and false when complete
  • Processes one task per second to prevent overloading
  • Handles a wide range of database operations including:
    • Key-value operations (get, set, delete)
    • Hash table operations (hget, hset, hgetall, etc.)
    • List operations (listadd, listrng, listset, etc.)
  • Automatically started by ramdb_db_fnc_addTask when new tasks are added
  • Each task execution is logged for debugging purposes
  • Should typically be spawned rather than called to avoid blocking
  • ramdb_db_fnc_addTask: Adds tasks to the queue for processing
  • ramdb_db_fnc_handler: Handles data returned from database operations
  • ramdb_db_fnc_scheduler: Manages callback responses from the database

Add Task | Handler | Init | Print Addon Name | Process Queue | Scheduler | Test