%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 3.144.100.245 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; /** * Class Job * @package Bitrix\Sender\Runtime */ abstract class Job { /** * Actualize jobs by campaign ID. * @return void */ public static function actualizeByCampaignId($campaignId) { (new SenderJob())->withCampaignId($campaignId)->actualize(); (new ReiteratedJob())->actualize(); } /** * Actualize jobs by letter ID. * @return void */ public static function actualizeByLetterId($letterId) { (new SenderJob())->withLetterId($letterId)->actualize(); (new ReiteratedJob())->actualize(); } /** * Actualize all jobs. * @return void */ public static function actualizeAll() { (new SenderJob())->actualize(); (new ReiteratedJob())->actualize(); } protected function addAgent($agentName, $interval = 60, $nextDateExec = '') { if (!$agentName || !is_string($agentName)) { return; } $agent = new \CAllAgent(); $agent->AddAgent( $agentName, "sender", "N", (int) $interval, null, "Y", (string) $nextDateExec ); } protected function removeAgent($agentName) { if (!$agentName || !is_string($agentName)) { return; } $agent = new \CAllAgent(); $list = $agent->getList( ["ID" => "DESC"], ["MODULE_ID" => "sender", "NAME" => $agentName] ); while ($row = $list->fetch()) { $agent->delete($row["ID"]); } } protected function agentExists($agentName) { if (!$agentName || !is_string($agentName)) { return false; } $agent = new \CAllAgent(); return (bool)$agent->getList( ["ID" => "DESC"], ["MODULE_ID" => "sender", "NAME" => $agentName] )->fetch(); } }