Load minimumExecutionTime

If minimumExecutionTime is defined in JobAnnotation, this one is used.
Otherwise is used set in Class

@param WorkAnnotation $workAnnotation
@param array $defaultSettings

@return int
545400
private function loadMinimumExecutionTime(WorkAnnotation $workAnnotation, array $defaultSettings)
    {
        return is_null($workAnnotation->minimumExecutionTime)
            ? (int) $defaultSettings['minimum_execution_time']
            : (int) $workAnnotation->minimumExecutionTime;
    }
31496
public function setDefaultOptions(array $defaultOptions)
    {
        $this->defaultOptions['TTL'] = isset($defaultOptions['TTL']) ? $defaultOptions['TTL'] : 2419200;
        $this->defaultOptions['urgency'] = isset($defaultOptions['urgency']) ? $defaultOptions['urgency'] : null;
        $this->defaultOptions['topic'] = isset($defaultOptions['topic']) ? $defaultOptions['topic'] : null;
        $this->defaultOptions['batchSize'] = isset($defaultOptions['batchSize']) ? $defaultOptions['batchSize'] : 1000;

        return $this;
    }
758262
@Override
    public Date getNextRunTime(LastExecution lastExecutionInfo, Date taskScheduledTime) {
        Date lastExecution = lastExecutionInfo == null ? null : lastExecutionInfo.getScheduledStart();
        return getNextTimeout(lastExecution, taskScheduledTime);
    }
1027221
public function ensureCorrectTime(array $timeproviders = null, $leniency = 5)
    {
        if ($timeproviders != null && !is_array($timeproviders))
            throw new TwoFactorAuthException('No timeproviders specified');

        if ($timeproviders == null)
            $timeproviders = array(
                new Providers\Time\NTPTimeProvider(),
                new Providers\Time\HttpTimeProvider()
            );

        // Get default time provider
        $timeprovider = $this->getTimeProvider();

        // Iterate specified time providers
        foreach ($timeproviders as $t) {
            if (!($t instanceof ITimeProvider))
                throw new TwoFactorAuthException('Object does not implement ITimeProvider');

            // Get time from default time provider and compare to specific time provider and throw if time difference is more than specified number of seconds leniency
            if (abs($timeprovider->getTime() - $t->getTime()) > $leniency)
                throw new TwoFactorAuthException(sprintf('Time for timeprovider is off by more than %d seconds when compared to %s', $leniency, get_class($t)));
        }
    }
331083
public function getSetting($key, $defaultValue = null)
    {
        return $this->hasSetting($key) ? $this->settings[$key] : $defaultValue;
    }
635905
public static function initializeObjectManagerCompileTimeFinalize(Bootstrap $bootstrap)
    {
        /** @var CompileTimeObjectManager $objectManager */
        $objectManager = $bootstrap->getObjectManager();
        $configurationManager = $bootstrap->getEarlyInstance(ConfigurationManager::class);
        $reflectionService = $objectManager->get(ReflectionService::class);
        $cacheManager = $bootstrap->getEarlyInstance(CacheManager::class);
        $logger = $bootstrap->getEarlyInstance(PsrLoggerFactoryInterface::class)->get('systemLogger');
        $packageManager = $bootstrap->getEarlyInstance(PackageManager::class);

        $objectManager->injectAllSettings($configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS));
        $objectManager->injectReflectionService($reflectionService);
        $objectManager->injectConfigurationManager($configurationManager);
        $objectManager->injectConfigurationCache($cacheManager->getCache('Flow_Object_Configuration'));
        $objectManager->injectLogger($logger);
        $objectManager->initialize($packageManager->getAvailablePackages());

        foreach ($bootstrap->getEarlyInstances() as $objectName => $instance) {
            $objectManager->setInstance($objectName, $instance);
        }

        Debugger::injectObjectManager($objectManager);
    }
1059191
public static function decider($maxTimes = 2)
    {
        return function ($retries, Request $request, Response $response = null, RequestException $exception = null) use ($maxTimes) {
            if ($retries >= $maxTimes) {
                return false;
            }

            if ($exception instanceof ConnectException) {
                return true;
            }

            if ($response && (int)$response->getStatusCode() === 503) {
                return true;
            }

            return false;
        };
    }
8359
public static function parseDefaultOptions($options = [], $defaults = [])
    {
        array_walk($defaults, function ($value, $key) use (&$options) {
            if (!isset($options[$key])) {
                $options[$key] = $value;
            }
        });

        return $options;
    }
725583
public Duration getWorkVariance()
   {
      Duration variance = (Duration) getCachedValue(ResourceField.WORK_VARIANCE);
      if (variance == null)
      {
         Duration work = getWork();
         Duration baselineWork = getBaselineWork();
         if (work != null && baselineWork != null)
         {
            variance = Duration.getInstance(work.getDuration() - baselineWork.convertUnits(work.getUnits(), getParentFile().getProjectProperties()).getDuration(), work.getUnits());
            set(ResourceField.WORK_VARIANCE, variance);
         }
      }
      return (variance);
   }
73209
private void initializeDefaults() {
    defaultUlimitMinimum = rmConf.getInt(
        "mapred.capacity-scheduler.default-minimum-user-limit-percent", 100);
    defaultSupportPriority = rmConf.getBoolean(
        "mapred.capacity-scheduler.default-supports-priority", false);
    defaultMaxJobsPerUsersToInitialize = rmConf.getInt(
        "mapred.capacity-scheduler.default-maximum-initialized-jobs-per-user",
        2);
  }
661993
function maxExecutionTimeRequirement()
    {
        $maxExecutionTime = (int)trim(ini_get('max_execution_time'));

        $humanTime = $maxExecutionTime . ($maxExecutionTime === 0 ? ' (no limit)' : '');
        $memo = "Craft requires a minimum PHP max execution time of 120 seconds. The max_execution_time directive in php.ini is currently set to {$humanTime}.";

        return array(
            'name' => 'Max Execution Time',
            'mandatory' => false,
            'condition' => $maxExecutionTime === 0 || $maxExecutionTime >= 120,
            'memo' => $memo,
        );
    }
1215853
public function times($times = null)
    {
        // API compat with mockery
        if ($this->atLeastWasCalled && $times !== null) {
            $this->atLeastWasCalled = false;
            $this->atLeast($times);
        } elseif ($times !== null) {
            if ($times === 0) {
                $this->never();
            } else {
                // normal operation
                $count = 0;
                $this->expectation->setPostPerformCallback(function() use (&$count, $times){
                    $count++;
                    $this->commentBuilder->incrementCallCount();
                    if ($count === $times) {
                        $this->expectation->setSatisfied(true);
                        $this->expectation->setPerformCallback(function($name, $args) use ($times) {
                            $message = "Unexpected call to {$this->methodName}";

                            if (count($args)) {
                                $message .= " with " . Util::printArray($args);
                            }

                            $message .= " - already called $times times";

                            throw new UnexpectedCallException($message);
                        });
                    }
                });

                $this->commentBuilder->setTimes($times);
                $this->commentBuilder->setAtLeast(false);
            }
        }
        
        return $this;
    }
667817
public function get_defaultsetting() {
        global $CFG;

        if (during_initial_install()) {
            return null;
        }
        $result = array();
        foreach($this->types as $archetype) {
            if ($caproles = get_archetype_roles($archetype)) {
                foreach ($caproles as $caprole) {
                    $result[$caprole->id] = 1;
                }
            }
        }
        return $result;
    }
858655
private function loadTimeout(JobAnnotation $jobAnnotation, array $defaultSettings)
    {
        return is_null($jobAnnotation->timeout)
            ? (int) $defaultSettings['timeout']
            : (int) $jobAnnotation->timeout;
    }
1271846
public static function lowest(... $datetimes)
    {
        $lowest = null;
        foreach ($datetimes as $datetime) {
            if (!$datetime instanceof \DateTimeInterface) {
                continue;
            }

            if ($datetime < $lowest || null === $lowest) {
                $lowest = $datetime;
            }
        }

        return $lowest;
    }
380337
private function checkLinesBetweenAnnotationsTypes($annotations)
    {
        if (empty($annotations)) {
            return;
        }

        $previousAnnotation = null;

        foreach ($annotations as $annotation) {
            if ($previousAnnotation === null) {
                $previousAnnotation = $annotation;
                continue;
            }

            $lines = $this->countLinesBetweenAnnotations($annotation, $previousAnnotation);
            $currentName = $this->getAnnotationName($annotation);
            $previousName = $this->getAnnotationName($previousAnnotation);

            $currentName === $previousName
                ? $this->checkSameAnnotations($annotation, $lines)
                : $this->checkDifferentAnnotations($annotation, $lines);

            $previousAnnotation = $annotation;
        }
    }
820295
public void annotateDefaultValueLater(JCExpression defaultValue, Env<AttrContext> localEnv,
            MethodSymbol m, DiagnosticPosition deferPos)
    {
        normal(() -> {
            JavaFileObject prev = log.useSource(localEnv.toplevel.sourcefile);
            DiagnosticPosition prevLintPos = deferredLintHandler.setPos(deferPos);
            try {
                enterDefaultValue(defaultValue, localEnv, m);
            } finally {
                deferredLintHandler.setPos(prevLintPos);
                log.useSource(prev);
            }
        });

        validate(() -> { //validate annotations
            JavaFileObject prev = log.useSource(localEnv.toplevel.sourcefile);
            try {
                // if default value is an annotation, check it is a well-formed
                // annotation value (e.g. no duplicate values, no missing values, etc.)
                chk.validateAnnotationTree(defaultValue);
            } finally {
                log.useSource(prev);
            }
        });
    }