3namespace Bitrix\Bizproc\Integration\Push;
6use Bitrix\Main\Engine\CurrentUser;
13 private static $setJob =
false;
14 private static $queue = [];
18 $this->canUse = Loader::includeModule(
'pull');
25 \CPullWatch::Add(
$userId, $command);
33 $userIds = [CurrentUser::get()?->getId() ?? 0];
41 'module_id' =>
'bizproc',
42 'command' => $command,
53 self::$queue[$tag] = [$command,
$params, $userIds];
54 $this->setBackgroundJob();
58 private function setBackgroundJob()
63 \Closure::fromCallable([__CLASS__,
'doBackgroundJob']),
65 Main\Application::JOB_PRIORITY_LOW - 10
71 private static function doBackgroundJob()
74 foreach (self::$queue as [$command,
$params, $userIds])
76 $push->send($command,
$params, $userIds);
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
sendLast(string $tag, string $command, array $params, array $userIds=[])
subscribe(int $userId, string $command)
send(string $command, array $params, array $userIds=[])
static add($recipient, array $parameters, $channelType=\CPullChannel::TYPE_PRIVATE)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']