firetreedesign / ccbpress-core

Introducing the easiest way to display information from Church Community Builder (CCB) on your church WordPress site.
https://churchdataconnect.com/
GNU General Public License v2.0
2 stars 0 forks source link

Data Import screen does not always show running jobs #51

Closed danielmilner closed 5 years ago

danielmilner commented 5 years ago

Instead of relying on the wp_option value to determine if a job is running, maybe we should also query the database and "fix" the import job status if it is incorrect.

danielmilner commented 5 years ago

A customer ran into an issue where the jobs were present in the database, but the WP Cron job that was supposed to process them no longer existed, so they were orphaned.

When this happens, an import will not run because it thinks that another import is already running.

danielmilner commented 5 years ago

Signs of a healthy running import job:

It seems that when the import job gets stuck, it's because the Cron job no longer exists and/or the ccbpress_import_in_progress option does not exists. Then, when the import attempts to run, it sees the wp_ccbpress_get_batch_% record(s) in the database and bails out.

danielmilner commented 5 years ago

d9f69fbb8536e63dda1792c55fe3f5bff25f268d