Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
singlethreadstrategy.php
1
<?php
2
3
namespace
Bitrix\Sender\Posting\SegmentThreadStrategy
;
4
5
use Bitrix\Main\Entity\ReferenceField;
6
use
Bitrix\Sender\PostingRecipientTable
;
7
use
Bitrix\Sender\Posting\Locker
;
8
9
class
SingleThreadStrategy
extends
AbstractThreadStrategy
10
{
11
public
const
THREADS_COUNT
= 1;
12
17
protected
function
checkLock
()
18
{
19
for
($i = 0; $i <= static::THREADS_COUNT; $i++)
20
{
21
if
(
Locker::lock
(self::GROUP_THREAD_LOCK_KEY, $this->groupStateId))
22
{
23
return
true
;
24
}
25
sleep(1);
26
}
27
return
false
;
28
}
29
}
Bitrix\Sender\Posting\Locker
Definition
locker.php:10
Bitrix\Sender\Posting\Locker\lock
static lock(string $key, int $id)
Definition
locker.php:19
Bitrix\Sender\Posting\SegmentThreadStrategy\AbstractThreadStrategy
Definition
abstractthreadstrategy.php:17
Bitrix\Sender\Posting\SegmentThreadStrategy\SingleThreadStrategy
Definition
singlethreadstrategy.php:10
Bitrix\Sender\Posting\SegmentThreadStrategy\SingleThreadStrategy\THREADS_COUNT
const THREADS_COUNT
Definition
singlethreadstrategy.php:11
Bitrix\Sender\Posting\SegmentThreadStrategy\SingleThreadStrategy\checkLock
checkLock()
Definition
singlethreadstrategy.php:17
Bitrix\Sender\PostingRecipientTable
Definition
posting.php:663
Bitrix\Sender\Posting\SegmentThreadStrategy
Definition
abstractthreadstrategy.php:3
modules
sender
lib
posting
segmentthreadstrategy
singlethreadstrategy.php
Создано системой
1.10.0