feat(SetupChecks): Add check for TaskProcessing pickup speed#53001
Merged
marcelklehr merged 1 commit intomasterfrom May 22, 2025
Merged
feat(SetupChecks): Add check for TaskProcessing pickup speed#53001marcelklehr merged 1 commit intomasterfrom
marcelklehr merged 1 commit intomasterfrom
Conversation
ChristophWurst
approved these changes
May 20, 2025
Member
ChristophWurst
left a comment
There was a problem hiding this comment.
Nice! A bit of test coverage wouldn't hurt :)
julien-nc
approved these changes
May 21, 2025
Member
julien-nc
left a comment
There was a problem hiding this comment.
I agree with the suggested change.
Other than that: 👍
038149d to
3832197
Compare
ChristophWurst
approved these changes
May 22, 2025
Comment on lines
+40
to
+72
| public function testPass(): void { | ||
| $tasks = []; | ||
| for ($i = 0; $i < 100; $i++) { | ||
| $task = new Task('test', ['test' => 'test'], 'settings', 'user' . $i); | ||
| $task->setStartedAt(0); | ||
| if ($i < 15) { | ||
| $task->setScheduledAt(60 * 5); // 15% get 5mins | ||
| } else { | ||
| $task->setScheduledAt(60); // the rest gets 1min | ||
| } | ||
| $tasks[] = $task; | ||
| } | ||
| $this->taskProcessingManager->method('getTasks')->willReturn($tasks); | ||
|
|
||
| $this->assertEquals(SetupResult::SUCCESS, $this->check->run()->getSeverity()); | ||
| } | ||
|
|
||
| public function testFail(): void { | ||
| $tasks = []; | ||
| for ($i = 0; $i < 100; $i++) { | ||
| $task = new Task('test', ['test' => 'test'], 'settings', 'user' . $i); | ||
| $task->setStartedAt(0); | ||
| if ($i < 30) { | ||
| $task->setScheduledAt(60 * 5); // 30% get 5mins | ||
| } else { | ||
| $task->setScheduledAt(60); // the rest gets 1min | ||
| } | ||
| $tasks[] = $task; | ||
| } | ||
| $this->taskProcessingManager->method('getTasks')->willReturn($tasks); | ||
|
|
||
| $this->assertEquals(SetupResult::WARNING, $this->check->run()->getSeverity()); | ||
| } |
Signed-off-by: Marcel Klehr <[email protected]>
3832197 to
f8f2695
Compare
Member
|
If backported, #53068 also needs backporting |
Member
Author
|
/backport to stable31 |
Member
Author
|
/backport to stable30 |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A lot of people complain about slow AI task execution, which is usually due to slow pickup speed, which is usually due to people not setting up a worker, which is usually because people do not read the docs. So, let's tell them to read the docs if it becomes an issue.
Checklist