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
Improve handling the failed preload items #6058
Comments
The main objective is:
Acceptance Criteria based on thread.
|
Reproduce the problemThe issue is reproducible by disabling the AS executions and loading multiple batches. Identify the root causeThe root cause from that issue is that we are not checking the AS queue status. Scope a solutionTo solve this issue we will have to create a new method public function get_waiting_actions() {
return $this->search(
[
'hook' => 'rocket_preload_job_preload_url',
'status' => ActionScheduler_Store::STATUS_PENDING,
]
);
] Then using that method inside the method Then we should add new tests for the new method and adapt tests from Estimate the effortEffort |
Looks good |
It seems that the first acceptance criterion isn't met.
SELECT * FROM `wp_actionscheduler_actions` WHERE `hook` = 'rocket_preload_job_preload_url' AND `status` != 'complete' LIMIT 50
The whole batch of URLs will be added to the AS table. For example, if the batch size is 100 and there were 45 jobs there you'll have a total of 145. About the second acceptance criterion, in the following screenshot you'll see that the status for the Can you please look into these? 🙏 |
Before submitting an issue please check that you’ve completed the following steps:
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
in-progress
in-progress
older than 100/15 minutes) in the database are set to failed while corresponding async actions are still in the ASin-progress
another 100 URLs, and registering another 100 ActionsExpected behavior
We should avoid exceeding number of Preload Actions in the AS defined by the batch size filter.
I'm not sure what would be the best solution here, I can think about some options, but further R&D is needed:
1 Check the number of
in-progress
items that we have in the queue before setting old ones to thefailed
status2 Set the
failed
status only for URLs that doesn't have corresponding Preload Action registered in the AS3 Our check about
in-progress
items could also take into the consideration the number of registered AS actions related to Preload.Additional context
This will help with issues related to the preload affecting the database size:
#6052
#6057
Backlog Grooming (for WP Media dev team use only)
The text was updated successfully, but these errors were encountered: