Verified Commit 6207ea2e authored by Erick Hitter's avatar Erick Hitter
Browse files

When an event runs, update its CPT entry directly, rather than relying on the options filtering

Reduces possibility for race conditions when multiple jobs run at once
parent b680696c
......@@ -147,7 +147,7 @@ class Events extends Singleton {
call_user_func_array( 'wp_reschedule_event', $reschedule_args );
wp_unschedule_event( $event['timestamp'], $event['action'], $event['args'] );
Cron_Options_CPT::instance()->mark_job_completed( $event['timestamp'], $event['action'], $event['instance'] );
// Run the event
do_action_ref_array( $event['action'], $event['args'] );
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment