Function admin_force_process_queue_handler

Source
pub async fn admin_force_process_queue_handler(
    headers: HeaderMap,
    __arg1: State<AppState>,
) -> Result<Json<ForceProcessQueueResponse>, StatusCode>
Expand description

HTTP handler for force queue processing operations.

Forces immediate processing of the crawl queue, bypassing the normal sleep period when no items are pending. This endpoint requires admin authentication via the X-Admin-Key header.

§Headers

  • X-Admin-Key: Required admin API key for authentication

§Returns

  • 200 OK: JSON response confirming force queue processing was triggered
  • 401 Unauthorized: If admin authentication fails
  • 500 Internal Server Error: If triggering fails

§Example

POST /admin/force-process-queue
X-Admin-Key: your-admin-key