-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add task processing manager method to get the list of available task type IDs #54848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
7ac9df5 to
bd5c8ce
Compare
|
|
||
| $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); |
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woop woop, even tests! 😍
bd5c8ce to
65863d6
Compare
|
@nickvergessen This addresses the performance hit because of the model retrieval when computing the capabilities. Should we backport this up to 30? |
|
/backport to stable32 |
kyteinsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
… task type IDs Signed-off-by: Julien Veyssier <[email protected]>
Signed-off-by: Julien Veyssier <[email protected]>
65863d6 to
1775c94
Compare
marcelklehr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛺
Some consumers of this API get the list of available task types with
manager->getAvailableTaskTypeswhich 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