Skip to content

Commit

Permalink
fix(TaskProcessing\Manager): Always use distributed cache and use PHP…
Browse files Browse the repository at this point in the history
… serialize

Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Feb 8, 2025
1 parent fd0c868 commit 2622e27
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/private/TaskProcessing/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,10 @@ public function getPreferredProvider(string $taskTypeId) {
public function getAvailableTaskTypes(): array {
if ($this->availableTaskTypes === null) {
// We use local cache only because distributed cache uses JSOn stringify which would botch our ShapeDescriptor objects
$this->availableTaskTypes = $this->cache->get('available_task_types');
$cachedValue = $this->distributedCache->get('available_task_types_v2');
if ($cachedValue !== null) {
$this->availableTaskTypes = unserialize($cachedValue);
}
}
if ($this->availableTaskTypes === null) {
$taskTypes = $this->_getTaskTypes();
Expand Down

0 comments on commit 2622e27

Please sign in to comment.