Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
recipientbuilderjob.php
1<?php
10
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='')
Definition job.php:50
removeAgent($agentName)
Definition job.php:69