1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
recipientbuilderjob.php
См. документацию.
1<?php
8
9namespace Bitrix\Sender\Runtime;
10
11use Bitrix\Main\Type\DateTime;
12
18{
26 public static function addEventAgent(int $postingId)
27 {
29 static::getAgentName((int)$postingId),
30 60,
31 (new DateTime())->add('+60 seconds')
32 );
33 }
34
42 public static function removeAgentFromDB(int $postingId)
43 {
45 static::getAgentName((int)$postingId)
46 );
47 }
48
56 public static function getAgentName(int $postingId)
57 {
58 return "\Bitrix\Sender\Runtime\RecipientBuilderJob::runAgent({$postingId});";
59 }
60
61 public static function runAgent(int $postingId)
62 {
63 $builder = new \Bitrix\Sender\Posting\Builder($postingId);
64
65 if (!$builder->isResult())
66 {
67 return self::getAgentName($postingId);
68 }
69
70 return '';
71 }
72}
addAgent($agentName, $interval=60, $nextDateExec='')
Определения job.php:50
removeAgent($agentName)
Определения job.php:69
static getAgentName(int $postingId)
Определения recipientbuilderjob.php:56
static removeAgentFromDB(int $postingId)
Определения recipientbuilderjob.php:42
static runAgent(int $postingId)
Определения recipientbuilderjob.php:61
static addEventAgent(int $postingId)
Определения recipientbuilderjob.php:26