BUG: Stuck WP-CLI sync generates a repeated output in the Sync Page #2737
Labels
bug
Something isn't working
module:sync
Issues related to the Sync functionality
module:wp-cli
Issues related to the WP-CLI commands
Milestone
Describe the bug
Currently, if a WP-CLI sync process gets killed without clearing the index meta option, any visit to the Sync Page will output the same message over and over again, wrongly suggesting that the index is still running. That happens because the Sync page does not communicate directly to the WP-CLI PHP process but rather reads from an option stored in the database.
Steps to Reproduce
2. Run
php -d max_execution_time=1 "$(which wp)" elasticpress index --per-page=2
so it times out3. Visit the Sync Page
4. Click on "Show Log"
5. See the same message being outputted
6. Run
wp elasticpress clear-index
7. See the sync page stopping to output the error
Expected behavior
Ideally, the plugin:
We have to improve it though, as we want to tell the admin user that the last sync process actually failed.
The text was updated successfully, but these errors were encountered: