. * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License version 3, * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ namespace Espo\Core\Job; use Espo\Core\Utils\Config; class ConfigDataProvider { private const MAX_PORTION = 15; public function __construct( private Config $config, private Config\ApplicationConfig $applicationConfig, ) {} public function runInParallel(): bool { return (bool) $this->config->get('jobRunInParallel'); } public function getMaxPortion(): int { return (int) $this->config->get('jobMaxPortion', self::MAX_PORTION); } public function getCronMinInterval(): int { return (int) $this->config->get('cronMinInterval', 0); } public function noTableLocking(): bool { return (bool) $this->config->get('jobNoTableLocking'); } public function getTimeZone(): string { if ($this->config->get('jobForceUtc')) { return 'UTC'; } return $this->applicationConfig->getTimeZone(); } }