- Updates Daemon to execute workers via WP's action hook

- Bootstraps Scheduler class
This commit is contained in:
Vlad
2016-03-03 15:42:10 -05:00
parent 9970ad7fb6
commit c4b728f4e1
6 changed files with 58 additions and 13 deletions

View File

@ -68,4 +68,11 @@ class CronHelper {
// throw an error if all connection attempts failed
throw new \Exception(__('Site URL is unreachable.'));
}
static function checkExecutionTimer($timer) {
$elapsed_time = microtime(true) - $timer;
if($elapsed_time >= self::daemon_execution_limit) {
throw new \Exception(__('Maximum execution time reached.'));
}
}
}