@@ -14,6 +14,8 @@ class Events extends Singleton {
private$concurrent_action_whitelist=array();
private$running_event=null;
/**
* Register hooks
*/
...
...
@@ -261,6 +263,10 @@ class Events extends Singleton {
if(!$this->can_run_event($event)){
returnnew\WP_Error('no-free-threads',sprintf(__('No resources available to run the job with action action `%1$s` and arguments `%2$s`.','automattic-cron-control'),$event->action,maybe_serialize($event->args)),array('status'=>429,));
}
// Free locks should event throw uncatchable error
'message'=>sprintf(__('Callback for job with action `%1$s` and arguments `%2$s` raised a Throwable - %3$s in %4$s on line %5$d.','automattic-cron-control'),$event->action,maybe_serialize($event->args),$t->getMessage(),$t->getFile(),$t->getLine()),
);
}
// Free process for the next event, unless it wasn't set to begin with
// Free locks for the next event, unless they weren't set to begin with
if(!$force){
// If we got this far, there's no uncaught error to handle