Queue Management

The queue management interface is located in Settings > Queues. It provides visibility into background tasks that are waiting to be processed or have failed.

Overview

The retry queue is a D1-backed table (retry_queue) that holds tasks which cannot be executed immediately and need to be retried later. The primary use case is Google Ads GCLID retry – when a conversion upload fails because the GCLID is too new for Google Ads to recognize (CLICK_NOT_FOUND), the system enqueues the conversion and a cron-scheduled handler retries it every 30 minutes until the GCLID becomes available or the configured TTL expires.

Queue Table

The queue management UI displays a paginated table with the following columns:

Column Description
Type The queue type identifier (e.g., gads_click_not_found).
Status Current state: pending, processing, completed, or failed.
Retry After The earliest time the item will be picked up for processing.
Attempts Number of processing attempts so far, out of the configured maximum.
Error The most recent error message, if any.
Created Timestamp when the item was first enqueued.

Actions

Refresh

Reload the queue table to see the latest state. Items may have been processed by the cron scheduler since the page was last loaded.

Reprocess Selected

Select one or more items using the checkboxes, then click Reprocess Selected. This resets the selected items to pending status with retry_after set to the current time, making them eligible for immediate pickup on the next cron cycle.

Use Reprocess to retry items that failed due to a transient issue (e.g., a temporary API outage) that has since been resolved.

Remove Selected

Select one or more items and click Remove Selected to permanently delete them from the queue. This is useful for clearing out items that are no longer relevant or that have been resolved manually.

Removing a queue item is permanent. If the underlying conversion still needs to be uploaded, you will need to re-trigger it from the source (e.g., by re-running the Pipedrive Automation).

Cron Processing

The worker exports a scheduled handler that runs on a configured cron trigger (every 5 minutes). On each invocation, it:

  1. Queries retry_queue for items where status = 'pending' and retry_after <= now.
  2. Marks each item as processing and increments attempt_count.
  3. Checks the Retry TTL – if the item was created longer ago than the TTL, it is marked as failed immediately.
  4. Otherwise, attempts the operation (e.g., uploading a conversion to Google Ads).
  5. On success, marks the item as completed.
  6. On failure, either marks it failed (if attempt_count >= max_attempts) or resets it to pending with retry_after set 30 minutes in the future.