Skip to content

Commit

Permalink
Extrawurst for Blitz
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Stark committed Jan 4, 2024
1 parent 4dd1c06 commit 63ea92a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes will be documented in this file.

## 2.0.2 - 2024-01-04

- Added extra condition to support the lastest changes in Blitz.



## 2.0.1 - 2022-09-14

- Fix `Queue must be an application component.` error
Expand Down
2 changes: 0 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"require": {
"php": "^7.4||^8.0",
"craftcms/cms": "^4.0.0",
"treeware/plant": "*",
"yiisoft/yii2-queue": "^2.3.3"
},
"require-dev": {
Expand Down Expand Up @@ -56,7 +55,6 @@
}
},
"extra": {
"treeware": {},
"name": "Relax",
"handle": "relax",
"hasCpSettings": false,
Expand Down
12 changes: 10 additions & 2 deletions src/Handlers/QueueServiceHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,16 @@ public function __invoke(): void

// Extrawurst for feed-me
if ($feedMe = Craft::$app->getPlugins()->getPlugin('feed-me')) {
/** @phpstan-ignore-next-line */
$feedMe->queue = $queue;
if (property_exists($feedMe, 'queue')) {
$feedMe->queue = $queue;
}
};

// Extrawurst for blitz
if ($blitz = Craft::$app->getPlugins()->getPlugin('blitz')) {
if (property_exists($blitz, 'queue')) {
$blitz->queue = $queue;
}
};
}
}

0 comments on commit 63ea92a

Please sign in to comment.