Cron not stopped correctly
-
Good day! Please forward the following to your dev team:
The CRON events of WP Fusion (pro) is triggering wp_die() to stop the event, this is incorrect as it also prevents the other queued CRON events from running.
A CRON event should never kill the process unless there is an actual execution error (with error message).See WPF_Background_Process::maybe_handle()
public function maybe_handle() {
// Don't lock up other requests while processing
session_write_close();
if ( $this->is_process_running() ) {
// Background process already running.
wp_die();
}
if ( $this->is_queue_empty() ) {
// No data to process.
wp_die();
}
$this->handle();
wp_die();
}Please change wp_die() to return instead. This should also be changed in the handle() methods.
public function maybe_handle() {
// Don't lock up other requests while processing
session_write_close();
if ( $this->is_process_running() ) {
// Background process already running.
return;
}
if ( $this->is_queue_empty() ) {
// No data to process.
return;
}
$this->handle();
}Thanks!
Cheers, Jory
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.