Closed danielmilner closed 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.
Signs of a healthy running import job:
ccbpress_import_in_progress
option exists.wp_ccbpress_get_cron
exists.wp_ccbpress_get_batch_%
exists.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.
d9f69fbb8536e63dda1792c55fe3f5bff25f268d
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.