Problem/Motivation

I've noticed warning when running the Commerce Recurring cron but can be in similar other cases:

Warning: Undefined array key "allow_duplicates" in Drupal\advancedqueue\Entity\Queue->prepareJob() (line 163 of modules/contrib/advancedqueue/src/Entity/Queue.php).
Drupal\advancedqueue\Entity\Queue->prepareJob(Object) (Line: 133)
Drupal\advancedqueue\Entity\Queue->enqueueJob(Object) (Line: 118)
Drupal\commerce_recurring\Cron->enqueueOrders(Object) (Line: 61)
Drupal\commerce_recurring\Cron->run() (Line: 33)

Proposed resolution

Maybe we need to improve the Queue:prepareJob() and use some default value for the "allow_duplicates" e.g.:
if (!$job_type_manager->getDefinition($job->getType())['allow_duplicates'] ?? TRUE) {

CommentFileSizeAuthor
#3 3460594-3.patch820 byteskhiminrm
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

khiminrm created an issue. See original summary.

khiminrm’s picture

Status: Active » Needs review
khiminrm’s picture

StatusFileSize
new820 bytes

attaching a patch for 1.0 for those who is using this patch https://www.drupal.org/project/advancedqueue/issues/2918866#comment-1561...