Prevent duplicate queue items from being created

Created on 26 December 2018, almost 6 years ago
Updated 13 June 2023, over 1 year ago

Problem/Motivation

The module currently creates queue items for every published node on every cron. It's likely, and entirely possible, that duplicate queue items are being created.

An example with cron running every hour:
Cron runs. During the queue time not all the items are processed.
Con runs again. Since every published node gets a queue item, some of the items are duplicates.

Proposed resolution

A database solution like Overriding Queues in Drupal 7. Or How Not to Create Duplicate Queue Items is not performant. It takes creating items from seconds to too many minutes to even count.

I'm looking into a solution like the one described in How to check if an item exists in a Queue?

Adding this feature to the module will be a performance boost for the module since duplicate queue items won't exist.

Remaining tasks

1. Add a GoogleAnalyticsCounterProcessor and GoogleAnalyticsCounterProcessorInterface to the module which only creates an item when the same item hasn't already been created.

User interface changes

None

API changes

GoogleAnalyticsCounterProcessor service will be added to the container.

Data model changes

None

πŸ“Œ Task
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States esod

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024