Problem/Motivation

Where would the log be generated? Is it in \Drupal\acquia_dam\IntegrationLinkRegister::removeIntegrationLink where we log if there are no integration links found?

if (empty($integration_links)) {
  $this->damLoggerChannel->warning(sprintf(
    'There are no integration links associated with entity: %s in local storage',
    $entity_uuid,
  ));
}

If that's the case, I think it's fine that we just remove the logs and exit out, assuming it was double queued somehow.
I see it's also in \Drupal\acquia_dam\IntegrationLinkRegister::removeTrackings.

Steps to reproduce

  • Create node and import a DAM asset
  • Run cron -> integration links are created (one for media and one for the node)
  • Delete media -> 2 queue items are created to delete integration links
  • DO NOT run cron but deleted the node. -> new queue item created to delete integration link (node)

At this point there are 2 queue items for the same task which is not necessary.

Proposed resolution

Instead of trying to work around Drupal's lack of handling for dupe queued items I think it's fine to just remove the logs and let the possible duplicates get processed. They'll just exit silently if they've already been handled.

Issue fork acquia_dam-3557134

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rajeshreeputra created an issue. See original summary.

rajeshreeputra’s picture

Status: Active » Needs review

requesting review.

rajeshreeputra’s picture

Status: Needs review » Fixed

Merged!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.