Skip to content

Conversation

@julien-nc
Copy link
Member

@julien-nc julien-nc commented Sep 3, 2025

Some consumers of this API get the list of available task types with manager->getAvailableTaskTypes which gives a full description of the task types, including the list of values for the enum input parameters. These values can be slow to compute, slowing down the process when they might not be needed.

This new method just get the list of available task type IDs.

Checklist


$this->availableTaskTypes = $availableTaskTypes;
$this->distributedCache->set('available_task_types_v2', serialize($this->availableTaskTypes), 60);
$this->distributedCache->set(self::TASK_TYPES_CACHE_KEY, serialize($this->availableTaskTypes), 60);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

new ServiceRegistration('test', BrokenSyncProvider::class)
]);
self::assertCount(1, $this->manager->getAvailableTaskTypes());
self::assertCount(1, $this->manager->getAvailableTaskTypeIds());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woop woop, even tests! 😍

@julien-nc julien-nc marked this pull request as ready for review September 4, 2025 09:14
@julien-nc julien-nc requested a review from a team as a code owner September 4, 2025 09:14
@julien-nc julien-nc requested review from Altahrim, nfebe and provokateurin and removed request for a team September 4, 2025 09:14
@julien-nc julien-nc force-pushed the enh/noid/taskprocessing-get-task-type-ids branch from bd5c8ce to 65863d6 Compare September 4, 2025 09:16
@julien-nc
Copy link
Member Author

@nickvergessen This addresses the performance hit because of the model retrieval when computing the capabilities. Should we backport this up to 30?

@AndyScherzinger
Copy link
Member

/backport to stable32

Copy link
Contributor

@kyteinsky kyteinsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@julien-nc julien-nc added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Sep 5, 2025
@julien-nc julien-nc force-pushed the enh/noid/taskprocessing-get-task-type-ids branch from 65863d6 to 1775c94 Compare September 5, 2025 09:37
Copy link
Member

@marcelklehr marcelklehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛺

@julien-nc julien-nc merged commit 2908f76 into master Sep 5, 2025
199 checks passed
@julien-nc julien-nc deleted the enh/noid/taskprocessing-get-task-type-ids branch September 5, 2025 10:10
@skjnldsv skjnldsv modified the milestones: Nextcloud 33, Nextcloud 32 Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants