Skip to content

Commit

Permalink
Merge pull request #1154 from initbiz/optimise-unique-property-values…
Browse files Browse the repository at this point in the history
…-query

Prevent from adding too many queue jobs for UniquePropertyValue
  • Loading branch information
tobias-kuendig authored Jul 12, 2024
2 parents a173d34 + 76a333e commit 692c0e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/UniquePropertyValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public static function updateUsingProduct(Product $product): void
{
$product->loadMissing(['categories']);
foreach ($product->categories as $category) {
Queue::push(UpdateUniquePropertyForCategory::class, ['id' => $category->id]);
self::updateUsingCategory($category);
}
}

Expand All @@ -154,7 +154,7 @@ public static function updateUsingPropertyGroup(PropertyGroup $propertyGroup): v
{
$propertyGroup->loadMissing(['categories']);
foreach ($propertyGroup->categories as $category) {
Queue::push(UpdateUniquePropertyForCategory::class, ['id' => $category->id]);
self::updateUsingCategory($category);
}
}

Expand Down
2 changes: 2 additions & 0 deletions updates/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -586,3 +586,5 @@ v3.3.2:
v3.4.0:
- 'Optimized unique property queries (thanks to @tomaszstrojny)'
- 031_01-create_unique_property_values_table.php
v3.4.1:
- 'Prevent from adding too many queue jobs for UniquePropertyValue'

0 comments on commit 692c0e7

Please sign in to comment.