Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
tenthreadsstrategy.php
1<?php
2
4
5use Bitrix\Main\Entity\ReferenceField;
10
12{
13 public const THREADS_COUNT = 10;
14
19 public function isProcessLimited(): bool
20 {
21 $maxParallelExecutions = \COption::GetOptionInt(
22 "sender",
23 "max_parallel_threads",
24 10
25 );
26
27 $count = GroupThreadTable::getCount(
28 [
29 '=STATUS' => GroupThreadTable::STATUS_IN_PROGRESS,
30 ]
31 );
32
33 return $count > $maxParallelExecutions;
34 }
35}