Jobby\BackgroundJob::checkMaxRuntime PHP Méthode

checkMaxRuntime() protected méthode

protected checkMaxRuntime ( string $lockFile )
$lockFile string
    protected function checkMaxRuntime($lockFile)
    {
        $maxRuntime = $this->config['maxRuntime'];
        if ($maxRuntime === null) {
            return;
        }
        if ($this->helper->getPlatform() === Helper::WINDOWS) {
            throw new Exception('"maxRuntime" is not supported on Windows');
        }
        $runtime = $this->helper->getLockLifetime($lockFile);
        if ($runtime < $maxRuntime) {
            return;
        }
        throw new Exception("MaxRuntime of {$maxRuntime} secs exceeded! Current runtime: {$runtime} secs");
    }