Commit dcf19771 authored by Erick Hitter's avatar Erick Hitter Committed by GitHub
Browse files

Merge pull request #46 from Automattic/43/remove-execution-buffer

Job execution buffer has proven unnecessary, and just wastes time
parents 6f98510f eb3c052a
......@@ -133,7 +133,7 @@ class Events extends Singleton {
}
// Ensure we don't run jobs too far ahead
if ( $timestamp > strtotime( sprintf( '+%d seconds', JOB_EXECUTION_BUFFER_IN_SECONDS ) ) ) {
if ( $timestamp > time() ) {
return new \WP_Error( 'premature', sprintf( __( 'Job with identifier `%1$s` is not scheduled to run yet.', 'automattic-cron-control' ), "$timestamp-$action-$instance" ), array( 'status' => 403, ) );
}
......
......@@ -7,6 +7,5 @@ namespace Automattic\WP\Cron_Control;
*/
const JOB_QUEUE_SIZE = 10;
const JOB_QUEUE_WINDOW_IN_SECONDS = 60;
const JOB_EXECUTION_BUFFER_IN_SECONDS = 15;
const JOB_TIMEOUT_IN_MINUTES = 10;
const JOB_CONCURRENCY_LIMIT = 10;
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