Commit 36c938ae authored by Erick Hitter's avatar Erick Hitter
Browse files

Don't need to check a job if it's already disallowed

parent 9083519e
......@@ -230,6 +230,11 @@ class Events_Store extends Singleton {
* When an entry exists, don't try to create it again
*/
public function block_creation_if_job_exists( $job ) {
// Job already disallowed, carry on
if ( ! is_object( $job ) ) {
return $job;
}
$instance = md5( maybe_serialize( $job->args ) );
if ( 0 !== $this->get_job_id( $job->timestamp, $job->hook, $instance ) ) {
return false;
......
Markdown is supported
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