TenThreadsStrategy::isProcessLimited

  1. Bitrix24 API (v. 23.675.0)
  2. sender
  3. TenThreadsStrategy
  4. isProcessLimited
  • Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/posting/threadstrategy/tenthreadsstrategy.php
  • Класс: Bitrix\Sender\Posting\ThreadStrategy\TenThreadsStrategy
  • Вызов: TenThreadsStrategy::isProcessLimited
public function isProcessLimited(): bool
{
	$maxParallelExecutions = \COption::GetOptionInt(
		"sender",
		"max_parallel_threads",
		10
	);

	$count = PostingThreadTable::getCount(
		[
			'=STATUS' => PostingThreadTable::STATUS_IN_PROGRESS,
		]
	);

	return $count > $maxParallelExecutions;
}

Добавить комментарий