%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 18.223.106.79 Web Server : Apache/2.4.52 (Ubuntu) System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 User : www-root ( 1010) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/sender/lib/runtime/ |
Upload File : |
<?php /** * Bitrix Framework * @package bitrix * @subpackage sender * @copyright 2001-2018 Bitrix */ namespace Bitrix\Sender\Runtime; use Bitrix\Main\Config\Option; use Bitrix\Sender\Integration\Bitrix24\Service; use Bitrix\Sender\Posting\ThreadStrategy\IThreadStrategy; use Bitrix\Sender\Posting\ThreadStrategy\ThreadStrategyContext; use Bitrix\Sender\Posting\SegmentThreadStrategy; /** * Class Env * @package Bitrix\Sender\Runtime */ class Env { /** * Return true if jobs run at cron. * @return bool */ public static function isSenderJobCron() { return Option::get("sender", "auto_method") === 'cron'; } /** * Return true if reiterated jobs run at cron. * @return bool */ public static function isReiteratedJobCron() { return Option::get("sender", "reiterate_method") === 'cron'; } /** * Get execution timeout. * @return int */ public static function getJobExecutionTimeout() { return self::isSenderJobCron() ? 0 : (int) Option::get('sender', 'interval'); } /** * Get execution item limit. * @return int */ public static function getJobExecutionItemLimit() { if(self::isSenderJobCron()) { return (int) Option::get('sender', 'max_emails_per_cron'); } else { return (int) Option::get('sender', 'max_emails_per_hit'); } } public static function isTransportNeedConsent(string $code) : bool { return Option::get('sender', "{$code}_consent") === 'Y'; } public static function getMaxConsentRequests(string $code) : bool { return (int) Option::get('sender','~' . $code . '_max_consent_requests',0); } /** * Get execution item limit. * @return IThreadStrategy */ public static function getThreadContext() { return ThreadStrategyContext::buildStrategy(Option::get('sender', 'thread_type')); } /** * Get execution item limit. * @return SegmentThreadStrategy\ThreadStrategy */ public static function getGroupThreadContext() { return SegmentThreadStrategy\ThreadStrategyContext::buildStrategy(Option::get('sender', 'thread_type')); } }