Skip to content
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

Syncs: status and error handling #2748

Merged
merged 6 commits into from
May 9, 2022
Merged

Syncs: status and error handling #2748

merged 6 commits into from
May 9, 2022

Conversation

felipeelia
Copy link
Member

Description of the Change

The code in this PR handles fatal errors during sync processes, so it does not get stuck but rather gets properly cleaned and logged. It also adds a new WP-CLI command: get-last-sync with the information of the latest sync performed, no matter the method (dashboard or cli.)

Closes #2737

Verification Process

In addition to the regular checks, running php -d max_execution_time=1 "$(which wp)" elasticpress index --per-page=2 makes the sync timeout, generating the main error the PR tries to fix.

Changelog Entry

Added: New get-last-sync WP-CLI command.
Changed: Log errors and remove indexing status on failed syncs.

Credits

Props @felipeelia

@felipeelia felipeelia added this to the 4.2.0 milestone May 9, 2022
@felipeelia felipeelia self-assigned this May 9, 2022
Copy link
Contributor

@tott tott left a comment

Choose a reason for hiding this comment

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

This looks good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Stuck WP-CLI sync generates a repeated output in the Sync Page
2 participants